Пример #1
0
            internal void Instantiate()
            {
                int idx = completedCount;

                if ((source != null) && (toBeContinue == null || toBeContinue(idx)))
                {
                    var o = UnityObject.Instantiate(source);
                    o.name          = source.name;
                    completedCount += 1;
                    if (result != null)
                    {
                        result.Add(o);
                    }
                    Misc.SafeInvoke(onInst, o, idx);
                    if (completedCount >= totalCount)
                    {
                        state = AsyncInstAssetInfo.EAsyncState.ToStop;
                        Misc.SafeInvoke(onInst, o, idx);
                    }
                }
                else
                {
                    state = AsyncInstAssetInfo.EAsyncState.ToStop;
                }
            }
Пример #2
0
 internal void Reset()
 {
     source         = null;
     result         = null;
     toBeContinue   = null;
     onInst         = null;
     onCompleted    = null;
     totalCount     = 0;
     completedCount = 0;
     state          = EAsyncState.ToStop;
 }