Skip to content

Commit 6a99b61

Browse files
committed
fix: Make OnDestroy and OnEnable both protected and virtual so they can properly be overidden in deriving classes.
1 parent cb1a2e7 commit 6a99b61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/Plugins/Source/Editor/EditorWindows/EOSEditorWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected EOSEditorWindow(string windowTitle, float minimumHeight = 50f, float m
122122
/// </summary>
123123
public string WindowTitle { get; }
124124

125-
private void OnEnable()
125+
protected virtual void OnEnable()
126126
{
127127
_initializeTask = Initialize();
128128
EditorApplication.update += CheckForInitialized;
@@ -288,7 +288,7 @@ public void OnGUI()
288288
}
289289
}
290290

291-
public void OnDestroy()
291+
protected virtual void OnDestroy()
292292
{
293293
Teardown();
294294
}

0 commit comments

Comments
 (0)