Executing, Cancelling, and Restarting Actions
v1.0
Executing Actions
Execute(this)
Execute(this)_cts = myExecutor.Execute(this);ExecuteAsync()
ExecuteAsync()private CancellationTokenSource _cts;
async void StartActions()
{
// Create a cancellation token source
_cts = new CancellationTokenSource();
// Execute with cancellation control
var result = await myExecutor.ExecuteAsync(this, _cts.Token);
if (result.WasCanceled)
Debug.Log("Actions were canceled!");
}Cancelling Actions
Async Cancellation
Dispose of the CancellationTokenSource
CancellationTokenSourceCancel All Actions
Emergency Shutdown
StopActionSequenceAction
StopActionSequenceActionRestarting Actions

Last updated