Aborts the UnityTask - will throw a ThreadAbortedException
C#unityTask.Abort();
Creates a continuation that executes synchronously on the UI thread when the target UnityTask completes
C#unityTask.ContinueOnUIThread((r) =>
{
// Update a gameobject
});
Creates a continuation that executes asynchronously when the target UnityTask completes
C#unityTask.ContinueWith((r) =>
{
// Return a value and or do some more work
});
Start the UnityTask
C#unityTask.Start();
Blocks the current thread until the UnityTask completes
C#unityTask.Wait();
Creates and starts a new UnityTask that runs on a new thread
C#UnityTask.Run(() =>
{
// Do some work on a background thread
});
Creates and starts a new UnityTask that runs synchronously on the UI thread
C#UnityTask.RunOnUIThread(() =>
{
// Queue some work on the ui thread
});
Blocks the current thread until all of the provided UnityTask objects have completed execution
C#UnityTask.WaitAll(unityTask1, unityTask2);
Monitors the provided UnityTask objects and raises a callback on the UI thread when they have all completed
C#UnityTask.WhenAll(() =>
{
// Raised when unityTask1 and unityTask2 have completed
}, unityTask1, unityTask2);