Skip to content

Commit 6ca1ba0

Browse files
committed
Bug fix, disable whole gui in play mode
1 parent f4bb9dc commit 6ca1ba0

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

scripts/Editor/DllManipulatorEditor.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,17 @@ private void DrawUsedDlls(IList<NativeDllInfo> usedDlls)
182182

183183
private void DrawOptions(DllManipulatorOptions options)
184184
{
185+
var guiEnabledStack = new Stack<bool>();
186+
guiEnabledStack.Push(GUI.enabled);
187+
if (EditorApplication.isPlaying)
188+
GUI.enabled = false;
189+
185190
options.onlyInEditor = EditorGUILayout.Toggle(ONLY_IN_EDITOR, options.onlyInEditor);
186191
options.enableInEditMode = EditorGUILayout.Toggle(ENABLE_IN_EDIT_MODE, options.enableInEditMode);
187192

188193
EditorGUILayout.Separator();
189194
EditorGUILayout.LabelField("Managed Side", EditorStyles.boldLabel);
190-
var guiEnabledStack = new Stack<bool>();
191195

192-
guiEnabledStack.Push(GUI.enabled);
193-
if (EditorApplication.isPlaying)
194-
GUI.enabled = false;
195196
options.mockAllNativeFunctions = EditorGUILayout.Toggle(TARGET_ALL_NATIVE_FUNCTIONS_GUI_CONTENT, options.mockAllNativeFunctions);
196197

197198
if (EditorGUILayout.Toggle(ONLY_ASSEMBLY_CSHARP_GUI_CONTENT, options.assemblyNames.Length == 0))

0 commit comments

Comments
 (0)