YarnTask<T>
public partial struct YarnTask<T>Inherits from System.ValueType
In Unity there are many different possible Awaiter types you could be making use of. Depending on your Unity set up the Yarn Task will wrap and forward any async behaviour into:
- Cysharp.Threading.Tasks.UniTask
- UnityEngine.Awaitable
- System.Threading.Tasks.Task
In general we recommend that you use the underlying awaiter instead of Yarn Task. Yarn Task exists primarily so that we don't have to wrap all our code and samples inside ifdefs and usings. As such it has only the minimum features needed to play the role of forwarding async calls. There are many quality of life features that the underlying awaiters have that we've not implemented because we don't need them for this job.
#Methods
#Forget()
readonly public void Forget()#FromResult(T)
#GetAwaiter()
public TaskAwaiter<T> GetAwaiter();Returns TaskAwaiter
#IsCompleted()
readonly public bool IsCompleted();Returns Boolean
#IsCompletedSuccessfully()
readonly public bool IsCompletedSuccessfully();Returns Boolean
Generated from Yarn Spinner for Unity 3.3.