Hi,
I am beginner to the EditorWindow scripting and am in need of support from you guys.
I would like to create a custom EditorWindow with my own dynamic content (just like a list).
I thought it would be simple to make but the following code is not working. Can you help please ?
public void OnGUI() {
if (GUILayout.Button("Press me !")) {
GUILayout.Label("Hello !!!");
Debug.Log("Call from OnGUI");
}
}
I get the message in the Debug.Log() but the label does not show.
I’ve added the Repaint() to the Update() method and still nothing. When I make the code static i.e. take out the label from the if() the it shows properly … but this is not what I want to achieve.
Any guides would be helpfull.
Thanks