public void ResetAllData() { StopAllCoroutines(); if (m_QuadTree) { m_QuadTree.Clear(); } m_QuadTree = null; if (m_ProcessTaskQueue != null) { m_ProcessTaskQueue.Clear(); } if (m_LoadedObjectList != null) { foreach (var item in m_LoadedObjectList) { DestroyObject(item, false); } m_LoadedObjectList.Clear(); } m_ProcessTaskQueue = null; m_LoadedObjectList = null; m_TriggerHandle = null; m_IsInitialized = false; }
void OnDestroy() { if (m_QuadTree) { m_QuadTree.Clear(); } m_QuadTree = null; if (m_LoadedObjectList != null) { m_LoadedObjectList.Clear(); } m_LoadedObjectList = null; m_TriggerHandle = null; }