Well I added a GUI toolbar to my scene, by creating an empty game object and attaching this script to it:
/* GUI.Toolbar example */
var toolbarInt = 0;
var toolbarStrings : Texture[];
var Buttonbg : GUIStyle;
function OnGUI () {
toolbarInt = GUI.Toolbar (Rect (10, 560, 310, 30), toolbarInt, toolbarStrings, Buttonbg);
}
If i run the game through the editor the GUI shows up and everything seems perfect, but if I “Build Run” the game there’s no GUI on screen whats so ever
I tried changing toolbar to simple buttons as well as playing around with the positions and still the GUI’s only show up when running scene directly through editor but NOT when I build and run the game on website or Windows standalone…
hmm I don’t think I have…
And It started to appear now, but it ONLY appears near on one of my other gui buttons and I can’t change the position. I mean I can but it doesn’t change what ever I do… The gui toolbar stays on one of my gui buttons i have in game :S
Nope it’s same thing…
I tried creating a new project and trying to add GUIs there, button showed up but stuff like toolbar etc doesn’t And the codes are good because I copy/ pasted them from Unity3d documentation :S
Now the weird thing is, when i try to create a new project and add a button, it works.
Then lets say i want to add toolbar instead of that button.
I add everything nicely and instead of toolbar the same button appears.
There are no errors, everything compiles well but…
in order to learn the basics of GUI in Unity, when I test in the Game Window in the editor it works perfectly. But when I came around to Building the *.exe it just showed the background image.’
I have tried to remove the background image to see if the buttons were behind it, but the buttons still were nowhere to see.
Further more after trying to fix the problem in several different ways an Error started popping up whenever I build; apparently I need a file called: c33035392c2802948bc7fc21130026cb.dll
But my none of the other computers my team uses have that file so I figure it has never been there in the first place, at least it only pops up when I build the specific project so the error must be somewhere inside that project.
I am having the same problem here. GUI works fine in Editor, but somehow it was gone after Build and Run. No matter you deploy as Web content or Executable standalone. Could be a bug.
Scripts are attached and everything. I’ve been fiddling with it for the past few hours, and there seems to be a disconnect between what the Editor calls iPad Wide (1024 x 768) and what actually is displayed on my iPad. For example, if I raise my buttons by a few hundred pixels, they show up on the iPad, but not the editor – visa-versa
I’ll file a bug report soon – I guess I’m the odd ball here?
Another thing just to keep in mind, is if you are publishing for the web, The gui wont show up if the coordinates are for free aspect. i spent 2 days trying to figure out were my GUI went, and i found out the coordinates were for free aspect, off the screen.
-The GUI works perfectly on older builds of my project that I built and run a week ago
-The GUI works perfectly fine in the editor when I hit the play button
-When I build the game for standalone deployment as a Windows executable, something interesting happens. The GUI doesn’t clean itself up when it changes. So I get graphical artifacts of the GUI objects from before, that just build up and never go away.