I have this text field on the OnGUI function of an EditorWindow:
trace.print("This should be " + m_mapName);
m_mapName = EditorGUILayout.TextField("Map Name", m_mapName);
But when I change the value of m_mapName externally (by pressing another button, for example), the value doesn’t refresh. For example, if I write something on the textfield, then call a function to set the value to:
m_mapName = "map";
I get
This should be map
But the control displays something. I tried to call Repaint after setting the value, but it doesn’t seem to work.
GUILayout.TextField works as expected. So I’ll try to report this as a bug, and see what feedback I get.