- Home /
Before start
Hello, so can someone tell me how to solve this problem without doing new scene. When i click button Play it opens me PlayGame scene where the game is playing right. But before the game will start I want to write instructions for the user that will know how to play the game. And then when he will click anywhere on the screen the game will start. If you know what am i talking about please help me :) Thanks!!
Answer by christoph_r · May 29, 2014 at 04:43 PM
Create a script that will set Time.timeScale = 0
in its Awake()
function and have it display your instructions as a GUI. Register clicks by the player in Update()
with Input.OnMouseDown
to call a method that will set Time.timeScale = 1
and disable the GUI.
Well I must say i really quite don't understand what you mean with that or i just can't do it myslef can you maybe help me a bit more :)?
Alright, which part is giving you trouble? You know how to make a GUI that displays text? If not, check out the GUI documentation. If it's the timeScale part: time scale sets at which rate in-game time is passing, so most functions/scripts should be paused if you set it to 0. So if you add that to your script, you have a screen that's displaying instructions (the GUI) and time is standing still, so your game isn't starting yet. Now you just need to set Time.timeScale back to 1 again and somehow get rid of the GUI, which you could either do by disabling the script, using bools etc.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Dialouge text. 1 Answer
activating a Camera Using a Toggle Button 1 Answer
c# add/move lines of text in GUI box 1 Answer