|
How can I save and display players times to complete the game using playerprefs in Unity3D? The reason why I'm asking is because I can't find any example code in Javascript that is simple to use and understand. Please provide example code for explanation. Thanks
(comments are locked)
|
|
Something like this: Resources: http://unity3d.com/support/documentation/ScriptReference/PlayerPrefs.html You may need to have multiple values like Players Time1, Players Time2, etc, since only one float can be saved at a time. Edit: Also you may not need playerPrefs. Playerprefs is really only necessary if you want to save a variable after the game as closed. i think you should use GetFloat when you set the guiTime instead of SetFloat.
Apr 10 '12 at 04:45 PM
ExTheSea
Very true, my error. I fixed it.
Apr 10 '12 at 06:35 PM
Lttldude
(comments are locked)
|
