protected virtual void OnDestroy() { if (m_scene != null) { //Debug.LogFormat("OnDestroy"); m_scene.Clean(); GameObject.DestroyImmediate(m_scene.gameObject); m_scene = null; } }
void ClearScene() { if (m_scene != null) { //Debug.LogFormat("OnDestroy"); m_scene.Clean(); GameObject.DestroyImmediate(m_scene.gameObject); m_scene = null; } }