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 '09 at 08:11 PM

Legogo gravatar image

Legogo
88 4 4 12

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 '09 at 08:18 PM Brian Kehrer
(comments are locked)
10|3000 characters needed characters left

4 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 '09 at 12:29 AM

Brian Kehrer gravatar image

Brian Kehrer
3k 9 13 53

Thx for the help (everyone).

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

Nov 23 '09 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 '09 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 '09 at 09:55 PM

nemo1992 gravatar image

nemo1992
1

(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 '11 at 03:41 AM

bioduds gravatar image

bioduds
-8

(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 '11 at 03:41 AM

bioduds gravatar image

bioduds
-8

(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:

x5087
x1052

asked: Nov 22 '09 at 08:11 PM

Seen: 2868 times

Last Updated: Nov 19 '11 at 03:41 AM