File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ private void OnEnable()
4646 {
4747 if ( EditorApplication . isPlaying )
4848 Destroy ( gameObject ) ;
49- else
49+ else if ( _singletonInstance != this )
5050 enabled = false ; //Don't destroy as the user may be editing a Prefab
5151 return ;
5252 }
Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ public override void OnInspectorGUI()
117117
118118
119119 bool unloadAll ;
120- if ( EditorApplication . isPlaying && t . Options . threadSafe )
120+ if ( ( EditorApplication . isPlaying || t . Options . enableInEditMode ) && t . Options . threadSafe )
121121 unloadAll = GUILayout . Button ( UNLOAD_ALL_DLLS_WITH_THREAD_SAFETY_GUI_CONTENT ) ;
122- else if ( EditorApplication . isPlaying && ! EditorApplication . isPaused && t . Options . loadingMode == DllLoadingMode . Preload )
122+ else if ( ( EditorApplication . isPlaying && ! EditorApplication . isPaused || t . Options . enableInEditMode ) && t . Options . loadingMode == DllLoadingMode . Preload )
123123 unloadAll = GUILayout . Button ( UNLOAD_ALL_DLLS_IN_PLAY_PRELOADED_GUI_CONTENT ) ;
124124 else
125125 unloadAll = GUILayout . Button ( "Unload all DLLs" ) ;
@@ -130,7 +130,7 @@ public override void OnInspectorGUI()
130130
131131 DrawUsedDlls ( usedDlls ) ;
132132 }
133- else if ( EditorApplication . isPlaying )
133+ else if ( EditorApplication . isPlaying || t . Options . enableInEditMode )
134134 {
135135 GUILayout . BeginHorizontal ( ) ;
136136 GUILayout . FlexibleSpace ( ) ;
@@ -139,7 +139,7 @@ public override void OnInspectorGUI()
139139 GUILayout . EndHorizontal ( ) ;
140140 }
141141
142- if ( EditorApplication . isPlaying && t . InitializationTime != null )
142+ if ( ( EditorApplication . isPlaying || t . Options . enableInEditMode ) && t . InitializationTime != null )
143143 {
144144 EditorGUILayout . Space ( ) ;
145145 EditorGUILayout . Space ( ) ;
You can’t perform that action at this time.
0 commit comments