Add EditorPlugin.DeinitializeEditor to properly cleanup Editor extensions on exit
This commit is contained in:
@@ -569,6 +569,10 @@ namespace FlaxEditor
|
||||
{
|
||||
Log("Editor exit");
|
||||
|
||||
// Deinitialize Editor Plugins
|
||||
foreach (var plugin in PluginManager.EditorPlugins)
|
||||
((EditorPlugin)plugin).DeinitializeEditor();
|
||||
|
||||
// Start exit
|
||||
StateMachine.GoToState<ClosingState>();
|
||||
|
||||
|
||||
@@ -52,5 +52,12 @@ namespace FlaxEditor
|
||||
public virtual void InitializeEditor()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleanup method called when this plugin is initialized and Editor is disposing (before plugin disposing). Use this method to remove any custom editor functionalities created within InitializeEditor.
|
||||
/// </summary>
|
||||
public virtual void DeinitializeEditor()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user