mirror of https://github.com/Cysharp/UniTask
parent
50ba93f951
commit
e67562b823
|
@ -40,7 +40,7 @@ namespace UniRx.Async
|
|||
public static void RegisterRaiseCancelOnDestroy(this CancellationTokenSource cts, GameObject gameObject)
|
||||
{
|
||||
var trigger = gameObject.GetAsyncDestroyTrigger();
|
||||
trigger.AddCancellationTriggerOnDestory(cts);
|
||||
trigger.AddCancellationTriggerOnDestroy(cts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace UniRx.Async.Triggers
|
|||
bool called = false;
|
||||
UniTaskCompletionSource promise;
|
||||
CancellationTokenSource cancellationTokenSource; // main cancellation
|
||||
object canellationTokenSourceOrQueue; // external from AddCancellationTriggerOnDestory
|
||||
object canellationTokenSourceOrQueue; // external from AddCancellationTriggerOnDestroy
|
||||
|
||||
public CancellationToken CancellationToken
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ namespace UniRx.Async.Triggers
|
|||
}
|
||||
|
||||
/// <summary>Add Cancellation Triggers on destroy</summary>
|
||||
public void AddCancellationTriggerOnDestory(CancellationTokenSource cts)
|
||||
public void AddCancellationTriggerOnDestroy(CancellationTokenSource cts)
|
||||
{
|
||||
if (called)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue