public static void StopMusic(this SoundComponent self, string path = null) { if (path == null || path == self.CurMusic) { if (SoundManager.Instance.m_bgm.clip != null) { SoundManager.Instance.m_bgm.Stop(); SoundManager.Instance.m_bgm.clip = null; self.CurMusic = null; GameUtility.ClearMemory(); } } }
public void ClearAfterLoadScene() { foreach (var item in m_NormalUIs) { Destroy(item.Value.gameObject); } foreach (var item in m_UIWontDestoryThroughSceneChange) { item.Value.HideUI(); } // Disbale blur effect m_AboveBlurEffectUIDisplayCount = 0; MessageBroadCastManager.OnEnableCameraBlurEffect(false); m_NormalUIs.Clear(); m_UIPathTracker.Clear(); GameUtility.ClearMemory(); }