complete implementation(triggers and etc...)

This commit is contained in:
neuecc
2020-05-05 04:08:53 +09:00
parent 7bc9ef90f1
commit b8d1a09224
100 changed files with 5364 additions and 3794 deletions

View File

@@ -40,7 +40,11 @@ namespace UniRx.Async
public static void RegisterRaiseCancelOnDestroy(this CancellationTokenSource cts, GameObject gameObject)
{
var trigger = gameObject.GetAsyncDestroyTrigger();
trigger.AddCancellationTriggerOnDestroy(cts);
trigger.CancellationToken.RegisterWithoutCaptureExecutionContext(state =>
{
var cts2 = (CancellationTokenSource)state;
cts2.Cancel();
}, cts);
}
}
}