private void OnEnable() { instance = this; if (database == null) { SelectDatabase(); } ResetChildEditors(); }
private void OnDestroy() { if (childEditors != null) { for (int i = 0; i < childEditors.Count; i++) { childEditors[i].OnDestroy(); } } instance = null; db = null; }
public static void ShowWindow() { LoginSystemEditor[] objArray = Resources.FindObjectsOfTypeAll <LoginSystemEditor>(); LoginSystemEditor editor = (objArray.Length <= 0 ? ScriptableObject.CreateInstance <LoginSystemEditor>() : objArray[0]); editor.hideFlags = HideFlags.HideAndDontSave; editor.minSize = new Vector2(690, 300); #if UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 editor.title = "Item System"; #else editor.titleContent = new GUIContent("Login System"); #endif editor.SelectDatabase(); }
private static void OpenEditor() { LoginSystemEditor.ShowWindow(); }