IAwaitInstruction.cs 588 B

123456789101112131415
  1. namespace UnityAsync
  2. {
  3. public enum FrameScheduler : byte { Update, LateUpdate, FixedUpdate }
  4. /// <summary>
  5. /// Allows awaitable instructions to be implemented in a similar fashion to
  6. /// <see cref="UnityEngine.CustomYieldInstruction"/>s without the use of abstract classes and heap allocations.
  7. /// For maximum versatility, any struct which implements this should have a <c>public Continuation{T} GetAwaiter()</c>
  8. /// method exposed. See <see cref="UnityAsync.WaitForFrames"/> for a concise example.
  9. /// </summary>
  10. public interface IAwaitInstruction
  11. {
  12. bool IsCompleted();
  13. }
  14. }