Everything is perfectly works on my pc, but the best score is not working on android, flash and web player. I mean 3 best score is working which are integer, but time.deltatime scores don’ work in any platform.
Any idea ?
Thanks.
Everything is perfectly works on my pc, but the best score is not working on android, flash and web player. I mean 3 best score is working which are integer, but time.deltatime scores don’ work in any platform.
Any idea ?
Thanks.
Can you post your code?
I am confused about what is not working.
I am also confused that about “Time.deltaTime scores”. This doesn’t make sense.
This first picture in working fine in computer and android.
This second picture is working fine in computer as u can see, but it is not working on android, just writing “0”.
Can you post your code, so we can see what’s going on?
it is perfectly working on pc, but phone it is not working.
Btw Second1’s text = 0;
void Start(){
highscore.text="BEST: "+ PlayerPrefs.GetFloat("Second1").ToString();
}
void BestScore(){
if(second<PlayerPrefs.GetFloat("Second1"))
{
PlayerPrefs.SetFloat("Second1",second);
highscore.text="BEST: " + second;
highscore.animation.Play("best");
}
else if(second>=PlayerPrefs.GetFloat("Second1"))
{
highscore.animation.Play("best");
}
}
I have heard some reports of PlayerPrefs not working on Android devices, possibly due to the way that the apps shut down.
You may want to research “PlayerPrefs Android” using the search in my signature.
You may also want to try forcing a save using PlayerPrefs.Save() so that you are doubly sure you have saved these changes to disk. (Read the documentation for best implementation!)
You may also want to look at OnApplicationQuit() which shows this in use.
Thank you. I will look at that documents.