|
Hello, I have a java script that acts as my menu in game, The game build is a Webplayer "Streamed" I want the script to display a GUItexture and disable the menu while the scene is being loaded and then load into the scene once its 100% The first part of the script works but nothing happens after the else{ statement
(comments are locked)
|
|
I guess you want it like this: This will display your GUITexture while the progress is below 1.0 and when it's fully loaded, show the GUI.Button to load the level. You might want to disable your GUITexture and the GUIText once the level is loaded... Thanks what you added kind of showed me the way, I got the GUItexture to enable and the menu to disable AFTER i have pressed the "Play" button, The GUItexture is a loading screen image so i want that to display untill the next scene has fully streamed to 100% and then to automatically load the next scene, The problem im having is, Without me pressing the Play button, the game will just start anyway once its 100%, So how do i get it to wait untill i have pressed play before loading the scene? Here is were i am at the moment
May 16 '12 at 11:48 PM
British89
Uhmm... why do you still have the GUI button around all this? That would mean all that code is only executed once when you pressed the button... Also a GUI.Button only works inside the OnGUI function... Your code is now a total chaos and doesn't make any sense. Your indention is also wrong, maybe you want to check your brackets and logic... I will edit my answer to show this code snippet in a full script.
May 17 '12 at 01:37 AM
Bunny83
Yeah its a mess first time trying to get things to work with streaming webplayer
May 17 '12 at 01:58 AM
British89
Basically how i have this set out, there are currently 3 scenes, Scene 0 = is splash screen transaction Scene 1 = Main menu Scene 2 = Game The thing im having trouble with is the fact its steaming, So by the time the main menu has loaded the "Start" button wont load the game as its not fully streamed to 100% yet so im stuck looking at the main menu, So i want it to show a loading screen after i press the play button, once its at 100% the game scene loads in.
May 17 '12 at 02:03 AM
British89
(comments are locked)
|
