|
Is there a variable that you can set to see how long you'r playing the current scene? I would realy like to make like a guilabel in the left corner of my screen saying how long the player is already playing. Ty!
(comments are locked)
|
|
You just need to have a variable that increments itself each second. Here's a very simple script. First go to Drag this script into an empty game object and add the GUIText that you created into the timeDisplay variable in the inspector window This script should work, tried already. I Hope this helped -Vatsal I would suggest using co-routines for this, in your start() method call a coroutine that yields for 1 second at a time and use Time.timeSinceLevelLoad. This will have a much lower overhead than running on each update - otherwise I would question your players need to know time to a fraction of a second. Note: this may break if you are using addative level loading (not tested this - just a hunch)
Apr 05 '12 at 01:53 PM
zz74b
(comments are locked)
|
