protected virtual void Join() { if (tree != null) { Mgr.AddTree(this); } }
public override void Do() { if (isLoaded) { return; } isLoaded = true; Mgr.postMains.Enqueue(() => { Mgr.RemoveEntities(); Mgr.singleInstance.StartCoroutine(LoadScene(identity.value)); }); }
public override void Do() { if (isRuned) { return; } isRuned = true; Mgr.postMains.Enqueue(() => { SceneManager.sceneLoaded += onLoaded; Mgr.RemoveEntities(); SceneManager.LoadScene(identity.value); }); }
private void Awake() { idx = ++idx; if (idx == 1) { singleInstance = this; DontDestroyOnLoad(gameObject); driver.Init(); driver.onBeforeRun += RunMainDo; driver.onBeforeRun += PostMain; InitWorkers(); driver.onTreeAdded.Insert(0, RepleaseProxyTree); driver.useMulThread = useMulThread; foreach (var item in GetComponentsInChildren <UnityEntity>()) { item.notDestroyOnLoad = true; } } else { Destroy(gameObject); } }