Best score with playerprefs Unity-android

Asked

Viewed 227 times

1

Hello. I made a normal best score system in Unity (when score>playerprefs, will set the text of textmesh). On the computer worked, only when I pass to Android the bestscore is 0 Someone would know what Iss is

  • Hello Ostruque10, welcome to the SOPT. Have you done any testing to make sure that piece of code in which the change of the score occurs is actually running on Android (for example, logging in or displaying on the screen a "passed here")? In fact, it would be important to put in the question the piece of code in which this change is made, otherwise it is very difficult for someone to be able to help you.

  • It was bad for the delay, I had put the variable in Playerprefs.getInt is now published if you can take a look https://play.google.com/store/apps/details?id=com.Deploy.Racintwings

1 answer

2

Friend, see if it is not related to the path of playerprefs on Android, as it is different from PC.

On Android they are stored in the phone’s internal memory on /data/data/appname/shared_prefs/appname.xml.

Where appname is the complete package identifier for example com.mycomany.example. Good studies!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.