diff --git a/scripts/Editor/DllManipulatorEditor.cs b/scripts/Editor/DllManipulatorEditor.cs index 6f400df..4735a51 100644 --- a/scripts/Editor/DllManipulatorEditor.cs +++ b/scripts/Editor/DllManipulatorEditor.cs @@ -336,8 +336,6 @@ static string GetFirstAssemblyToList(string[] allAssemblies) public static void LoadAllShortcut() { DllManipulator.LoadAll(); - RepaintAll(); - DllManipulatorWindowEditor.RepaintAll(); } #if UNITY_2019_1_OR_NEWER @@ -348,10 +346,10 @@ public static void LoadAllShortcut() public static void UnloadAll() { DllManipulator.UnloadAll(); - RepaintAll(); - DllManipulatorWindowEditor.RepaintAll(); } + [NativeDllLoadedTrigger] + [NativeDllAfterUnloadTrigger] public static void RepaintAll() { var editors = Resources.FindObjectsOfTypeAll(); diff --git a/scripts/Editor/DllManipulatorWindowEditor.cs b/scripts/Editor/DllManipulatorWindowEditor.cs index d275ef8..74a17f6 100644 --- a/scripts/Editor/DllManipulatorWindowEditor.cs +++ b/scripts/Editor/DllManipulatorWindowEditor.cs @@ -15,6 +15,8 @@ static void Init() window.Show(); } + [NativeDllLoadedTrigger] + [NativeDllAfterUnloadTrigger] public static void RepaintAll() { if(window) window.Repaint();