Using Unity 2022.3.9f1
Apparently if you use inheritance with an editor window inherited script, GUILayout.button function gets bugged out?
public class FooA: EditorWindow {
void OnGUI(){
if(GuiLayout.Button("DoStuff")){
Debug.Log("Clicked");
}
}
}
public class FooB: FooA{
override void OnGUI(){
base.OnGUI();
}
}
If we make an editor window with class FooB, the GuiLayout.Button function gets called multiple times and “Clicked” gets printed to the console multiple times, even when I just hover the mouse over the window and don’t click the button the function still gets called. Any ideas?