private void OnDisable() { if (_window == this) { _window = null; } }
private static void OpenFromMenu() { if (_window == null) { _window = EditorWindow.GetWindow <ScreenshotRecorderWindow>(); _window.Show(); _window.position = new Rect(20, 80, 500, 300); } else { _window.Focus(); } }
private void OnEnable() { if (_window == null) { _window = this; } else { Object.DestroyImmediate(this); } this.titleContent = new GUIContent("Screenshot Recorder"); }