- Home /
Problem with GUI and webplayer
I don't understand why but some code that works in Unity (just a GUI.Label()) doesn't show in the webplayer ...
Any advise ?
-EDIT-
Sorry, I should have been more specific. I have two scene in my build. One is the menu and one is the app.
The menu has currently juste a script that contains a
GUI.Label(Rect(10,10,200,30),"testing");
nothing too fancy ... Doesn't work in the webplayer & the .exe I tried to build another project and it works ... I think it's related with how I should use the scenes (I just drag&dropped the scene in the build list)
Does it not show in any builds, or just the not in the webplayer? Did you add the scene to the build settings? Is it positioned in a place where it would be onscreen in the web resolution?
Answer by Brian-Kehrer · Nov 23, 2009 at 12:29 AM
Dragging and dropping should work, although if you move scenes in the project between builds, sometimes they are not added properly. I'm not sure if that has changed in 2.6.
Try opening the build settings, deleting all the scenes, and re-adding (dragging and dropping is fine) the scene in question. If you want to be sure the scene is working, add a GUITexture (not from code, but from the MenuBar GameObject-> CreateOther ->GUITexture) and save it in your scene. See if that shows up.
Thx for the help (everyone).
I rebuild everything from scratch and it works now. I guess Unity isn't very stable yet ^^
All in all, it's pretty stable. This is one quirk I have seen, but really there aren't too many
Answer by Nabeel Saleem · Jun 04, 2014 at 08:51 AM
Have you tried this?
-From import settings
Texture type=texture
Filter mode=Trilinear
Slect web as a platform and check yes on override for web
Max size=max
Format=truecolor and click apply
Answer by nemo1992 · Nov 22, 2009 at 09:55 PM
Maybe your Unity Webplayer window is to small to include Rect you've specified.
Answer by bioduds · Nov 19, 2011 at 03:41 AM
Deleting all the scenes and readding worked for me. Thanks a lot!
Answer by bioduds · Nov 19, 2011 at 03:41 AM
Deleting all the scenes and readding worked for me. Thanks a lot!
Your answer

Follow this Question
Related Questions
How to detect if mouse is over GUI element in Web Player? 0 Answers
How do I show a txt file from my server in GUI? 3 Answers
How to take a Screenshot that includes GUI 1 Answer
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
Missing characters in Mac webplayer - Font/GUI issue? 0 Answers