Exemplo n.º 1
0
 public static Promise <T> QueueOnMainThread <T>(this Promise <T> promise,
                                                 Promise <T> .Fulfilled onFulfilled,
                                                 Promise <T> .Failed onFailed         = null,
                                                 Promise <T> .Progressed onProgressed = null)
 {
     PromiseService.AddPromise <T>(promise, onFulfilled, onFailed, onProgressed);
     return(promise);
 }
Exemplo n.º 2
0
        static PromiseService getService()
        {
            if (_service == null)
            {
                _service = new GameObject("PromiseService").AddComponent <PromiseService>();
                DontDestroyOnLoad(_service);
                _service.updateName();
            }

            return(_service);
        }
Exemplo n.º 3
0
 void OnDestroy()
 {
     _service = null;
 }