public static SimpleCoroutineAwaiter <UnityEngine.Object> GetAwaiter(this ResourceRequest instruction)
    {
        var awaiter = new SimpleCoroutineAwaiter <UnityEngine.Object>();

        RunOnUnityScheduler(() => AsyncCoroutineRunner.Instance.StartCoroutine(InstructionWrappers.ResourceRequest(awaiter, instruction)));
        return(awaiter);
    }
Exemple #2
0
        public static SimpleCoroutineAwaiter <UnityEngine.Object> GetAwaiter(this ResourceRequest instruction)
        {
            var awaiter = new SimpleCoroutineAwaiter <UnityEngine.Object>();

            UnitySystem.RunOnUnityScheduler(() => UnitySystem.SystemBehavior.StartCoroutine(
                                                InstructionWrappers.ResourceRequest(awaiter, instruction)));
            return(awaiter);
        }
        public static SimpleCoroutineAwaiter <Object> GetAwaiter(this ResourceRequest instruction)
        {
            var awaiter    = new SimpleCoroutineAwaiter <Object>();
            var enumerator = InstructionWrappers.ResourceRequest(awaiter, instruction);

            RunOnUnityScheduler(() => RunCoroutine(enumerator));
            return(awaiter);
        }