void OnDestroy() { if (s_instane == this) { s_instane = null; } }
static void Open() { if (s_instane) { return; } s_instane = CreateInstance <DefineSymbolEditorWindow>(); s_instane.ShowUtility(); }
//------------------------------------------------------ // unity system function //------------------------------------------------------ void OnEnable() { s_instane = this; titleContent = new GUIContent("DefineSymbol Editor"); minSize = new Vector2(570f, 380f); m_platforms = Array.ConvertAll(kTargets, i => new DefineSymbolPlatformData(i)); m_current = Array.Find(m_platforms, i => i.target == EditorUserBuildSettings.selectedBuildTargetGroup) ?? m_platforms[0]; m_data = DefineSymbolData.Load(); m_context = new DefineSymbolContext(m_data.context); InitGUI(); UpdatePresetLabels(); SetSymbolMode(); }