UnityNinja Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UnityNinja CommunityLog in

UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.


descriptionSaving your High Score??? EmptySaving your High Score???

more_horiz
Hi all,

I'm having a bit of trouble I've been searching for a way to save my high score and nothing seems to be working (i must be doing something wrong)??? ive read playerprefs is the way to do it but i still can't work it out can anyone give a step by step explanation of this so i can understand the process please.

I've got a simple score that adds one point every time you go through a check point and when i die i would like to have the high score saved and displayed on the main menu


Thanks for any help...

descriptionSaving your High Score??? EmptyRe: Saving your High Score???

more_horiz
Hi! I seem to be thinking there may be a way to achieve this, maybe something like this?

Code:

#pragma strict
function Update () {
if(dead)
{
if(GUI.Button(Rect(10,10,150,100("Player Score")) {
Debug.log("Player Read Score");
}
}
}

this is a foundation of the script you may want to make
try and implement a function called dead()
so that you can use it when referencing different parts of the script
-BryceCain25

descriptionSaving your High Score??? EmptyRe: Saving your High Score???

more_horiz
you have to do it over networking becuase unity starts a over everything when you press play

descriptionSaving your High Score??? EmptyRe: Saving your High Score???

more_horiz
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply