x


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)

more ▼

asked Nov 22, 2009 at 08:11 PM

Legogo gravatar image

Legogo
88 8 8 18

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?

Nov 22, 2009 at 08:18 PM Brian Kehrer
(comments are locked)
10|3000 characters needed characters left

5 answers: sort voted first

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.

more ▼

answered Nov 23, 2009 at 12:29 AM

Brian Kehrer gravatar image

Brian Kehrer
3k 21 29 73

Thx for the help (everyone).

I rebuild everything from scratch and it works now. I guess Unity isn't very stable yet ^^

Nov 23, 2009 at 04:08 PM Legogo

All in all, it's pretty stable. This is one quirk I have seen, but really there aren't too many

Nov 23, 2009 at 08:37 PM Brian Kehrer
(comments are locked)
10|3000 characters needed characters left

Maybe your Unity Webplayer window is to small to include Rect you've specified.

more ▼

answered Nov 22, 2009 at 09:55 PM

nemo1992 gravatar image

nemo1992
17

(comments are locked)
10|3000 characters needed characters left

Deleting all the scenes and readding worked for me. Thanks a lot!

more ▼

answered Nov 19, 2011 at 03:41 AM

bioduds gravatar image

bioduds
7

(comments are locked)
10|3000 characters needed characters left

Deleting all the scenes and readding worked for me. Thanks a lot!

more ▼

answered Nov 19, 2011 at 03:41 AM

bioduds gravatar image

bioduds
7

(comments are locked)
10|3000 characters needed characters left

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

SOURCE

more ▼

answered Jun 04 at 08:51 AM

Nabeel Saleem gravatar image

Nabeel Saleem
416 2 6 16

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x5997
x1196

asked: Nov 22, 2009 at 08:11 PM

Seen: 3598 times

Last Updated: Jun 04 at 08:51 AM