GUI.Window called from within a GUI.Window

I spent a few hours trying to get a selection grid, or button, or anything that gives output from a GUI.Window that I had created from within a GUI.Window.

Apparently calling a GUI.Window from within a GUI.Window is bad juju and should not be done. There are no errors given, no warnings, nothing. Output simply comes back as if nothing changed and you sit there wondering just wtf is up.

I eventually found some obscure forum post from 67 years ago saying not to open a window from within a window.

Any chance of having the documentation updated, or give a warning, or anything for others when they run into this? I mean, it just seems logical that I should be able to do this.

I believe not, because there’s no love for UnityGUI anymore (no bug fixes etc).

Huh, maybe I missed the memo, as I’ve only just started with Unity a couple months back, but my interpretation was:

  1. At one point, GUITexture and GIUText were added, around 2.0 or something. It was okay but lacking.
  2. Unity 3.5 or something, OnGUI was added. It was more flexible but not incredible, particularly on mobile apps.
  3. Unity 4.0 or so they cleaned up the issues with garbage collectoin, and OnGUI is usable, but not great for mobile apps unless absolutely necessary.

Are they seriously no longer going to support it, or… err… were you just kind of joking? I don’t know :stuck_out_tongue:

Since most GUI things I can write myself, I’d rather not spend the cash on some GUI interface stuff someone else wrote, and then find out it is quirky in it’s own right. (maybe this isn’t the case, but if I write it I know how it runs and when there are issues, I can fix them more easily, at least that’s my thinking.)

With 4.0, the old UnityGUI was ported from C# to C++, so it runs much faster.

UnityGUI is “here to stay” - the reson is editor scripting. But they are not proud of it, having no love for it.

It had some bugs found by users, but they have never been solved.