protected virtual void Start() { CameraSetting(); if (!PreventLoadCallBack && SSSceneManager.Instance != null) { SSApplication.OnLoaded(gameObject); } }
protected override void Awake() { base.Awake(); if (Application.isPlaying) { if (SSSceneManager.Instance != null) { SSApplication.OnUnloaded(gameObject); } Destroy(gameObject); } }
/* #if UNITY_EDITOR * void OnValidate() * { * Rename(); * FindCameras(); * FindEventSystems(); * } #endif */ protected virtual void Awake() { /* #if UNITY_EDITOR * Rename(); * FindCameras(); * FindEventSystems(); #endif */ if (Application.isPlaying && !PreventLoadCallBack && SSSceneManager.Instance != null) { foreach (Camera cam in m_Cameras) { AllCameraClearFlags.Add(cam, cam.clearFlags); cam.clearFlags = CameraClearFlags.Depth; } SSApplication.OnLoaded(gameObject); } }
private void CreateLoadingsThenLoadFirstScene() { m_IsBusy = true; if (string.IsNullOrEmpty(m_LoadingSceneName)) { AfterLoading(); return; } if (m_LoadingBack == null) { SSApplication.LoadLevelAdditive(m_LoadingSceneName, m_IsLoadAsync, (GameObject root) => { CreateLoadingBack(root); CreateLoadingTop(); AfterLoading(); }); } }
private void LoadScene(string sn, NoParamCallback onLoaded) { if (m_Dict.ContainsKey(sn)) { ActiveScene(sn); onLoaded(); } else { SSApplication.LoadLevelAdditive(sn, m_IsLoadAsync, (GameObject root) => { GameObject scene = root; m_Dict.Add(sn, scene); scene.transform.parent = m_Scenes.transform; OnSceneLoad(scene); onLoaded(); }); } }