Пример #1
0
        void LoadAssets()
        {
            LoadAssetProcess Process = new LoadAssetProcess();

            Debug.Log("Load");
            Process.FullName      = GetActivityFullName();
            Process.Layer         = GetLayer();
            Process.FinishHandler = (asset) =>
            {
                m_Asset = asset as GameObject;
                Init();
            };
            Send(UIRoot.NotificationType.EnqueueAProcess, Process);
        }
Пример #2
0
        IEnumerator _LoadElements()
        {
            while (true)
            {
                if (m_QueueProcess.Count > 0)
                {
                    LoadAssetProcess process = m_QueueProcess.Peek();
                    if (!process.IsStart)
                    {
                        yield return(process.Start());

                        AddLayer(process.Asset as GameObject, process.Layer);

                        m_QueueProcess.Dequeue();
                    }
                }
                yield return(m_WaitNextFrame);
            }
        }