I have a main menu with buttons that each open new GUI parts with their own buttons, etc. inside them.
Should I have each of these separate GUI parts be in their own scripts, or does it make sense to have them all in a single GUI script?
I have a main menu with buttons that each open new GUI parts with their own buttons, etc. inside them.
Should I have each of these separate GUI parts be in their own scripts, or does it make sense to have them all in a single GUI script?
Yes, it is possible to have them in a single script, I’d even say MANDATORY if you want to have a full control over the drawing order.
I’ve done a pretty complex things running from a single script (single OnGUI call), see here.