Example #1
0
        public System.Collections.IEnumerator Load()
        {
            if (_isRemoteLoaded)
            {
                yield break;
            }
            Scene checkScene = SceneManager.GetSceneByName(remoteSceneName);

            if (!checkScene.isLoaded)
            {
                ThreadPriority lastPriority = Application.backgroundLoadingPriority;
                Application.backgroundLoadingPriority = loadingPriority;
                AsyncOperation async = SceneManager.LoadSceneAsync(remoteSceneName, LoadSceneMode.Additive);
                yield return(async);

                Application.backgroundLoadingPriority = lastPriority;
            }
            RemoteLevel[] remoteLevels = Object.FindObjectsOfType <RemoteLevel>();
            Scene         scene        = SceneManager.GetSceneByName(remoteSceneName);

            for (int i = 0; i < remoteLevels.Length; i++)
            {
                if (remoteLevels[i].gameObject.scene.path == scene.path)
                {
                    sequenceCollection = remoteLevels[i].sequenceCollection;
                    break;
                }
            }
            _isRemoteLoaded = true;
        }
Example #2
0
 public SegmentSequenceEditor(MonoBehaviour undoObject, SegmentSequenceCollection collection, Rect rect)
 {
     sequences       = collection.sequences;
     this.undoObject = undoObject;
     viewRect        = rect;
     guiInitialized  = false;
     InitStaticObjects();
 }