/// <inheritdoc/> protected override void DoDestroy() { if (this.currentPresetInspector != null) { DestroyImmediate(this.currentPresetInspector); this.currentPresetInspector = null; } }
/// <inheritdoc/> protected override void DoEnable() { AutoInitializeUserSettings(); this.titleContent = new GUIContent(TileLang.ParticularText("Action", "Create Tile System")); this.InitialSize = this.minSize = new Vector2(580, 375); this.maxSize = new Vector2(580, Screen.currentResolution.height); if (this.currentPreset == null) { this.currentPreset = ScriptableObject.CreateInstance <TileSystemPreset>(); this.currentPreset.hideFlags = HideFlags.DontSave; } if (this.currentPresetInspector == null) { this.currentPresetInspector = (TileSystemPresetInspector)UnityEditor.Editor.CreateEditor(this.currentPreset, typeof(TileSystemPresetInspector)); } this.currentPresetInspector.DisableUndoOnSerializedObject = true; // Restore previous preset selection? this.SetSelectedPreset(s_SelectedPresetGuid); }