void OnDestroy() { coroutine = null; UniversalEditorUtility.SaveEditorLayout(this); if (rootCtrl == null) { return; } if (onDestroy != null) { onDestroy(this); } geometryTool.ReleaseAllGeometryObj(); renderer.Destroy(rootCtrl); rootCtrl = null; EditorManager.GetInstance().RemoveEditor(editorName); onAwake = null; onEnable = null; onDisable = null; onUpdate = null; onGUI = null; onDestroy = null; onMessage = null; onCoroutineMessage = null; onCoroutineTaskFinished = null; renderer = null; GC.Collect(); }