Quantcast
Channel: Latest Questions by CallToAdventure
Viewing all articles
Browse latest Browse all 62

Reading Player.prefs

$
0
0
I am trying to change the material of a medal - this is paired to Game Center Achievements; ANd I am using player prefs to show my custom medal (as opposed to the default GC achievement on top); Now - even if the player scores zero, on the end level it will see his last achieved medal. So when I am doing this: if (PlayerPrefs.GetInt("PlayerAchievement1", 1) == 1) { rank.renderer.material.mainTexture = RankTexture[0]; } else if (PlayerPrefs.GetInt("PlayerAchievement2", 1) == 1) { rank.renderer.material.mainTexture = RankTexture[1]; } I get random results. What am I doing wrong?

Viewing all articles
Browse latest Browse all 62

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>