06-11-2021, 10:06 PM
I am trying to build a GUI that will work in build or in editor, so that my team can leave notes & comments in world during edit time & in builds. I had to hack around the Render command's code that states:
if (!EditorGUIUtility.editingTextField)
GUIUtility.keyboardControl = GUIUtility.GetControlID(FocusType.Passive);
}
...because that EditorGUIUtility function only returns true if your text box is an EditorGUI Textbox. My work around involved to naming the gui boxes & checking for their names, but hopefully there's a more general solution.
if (!EditorGUIUtility.editingTextField)
GUIUtility.keyboardControl = GUIUtility.GetControlID(FocusType.Passive);
}
...because that EditorGUIUtility function only returns true if your text box is an EditorGUI Textbox. My work around involved to naming the gui boxes & checking for their names, but hopefully there's a more general solution.