Quantcast
Channel: Questions in topic: "playerprefs"
Viewing all articles
Browse latest Browse all 1333

PlayerPrefs help !

$
0
0
Hi, I tried in very much ways, but I really can't figure it out. This is a level lock/unlock system made by me. On my PC works perfectlly, but when I test it on my android smartphone nothing works. Why ? If I will use PlayerPrefs will work ? How I should use PlayerPrefs ? Because I tried in very much ways and no result. Here is my script: using UnityEngine; using System.Collections; public class LevelLockSystem : MonoBehaviour { public GameObject unlockLevel2; public GameObject unlockLevel3; public GameObject unlockLevel4; public GameObject unlockLevel5; public GameObject unlockLevel6; public GameObject unlockLevel7; public GameObject unlockLevel8; public GameObject unlockLevel9; public GameObject unlockLevel10; public void Start() { } public void LockAllLevels() { unlockLevel2.SetActive(true); unlockLevel3.SetActive(true); unlockLevel4.SetActive(true); unlockLevel5.SetActive(true); unlockLevel6.SetActive(true); unlockLevel7.SetActive(true); unlockLevel8.SetActive(true); unlockLevel9.SetActive(true); unlockLevel10.SetActive(true); } public void UnlockLevel2() { unlockLevel2.SetActive(false); } public void UnlockLevel3() { unlockLevel3.SetActive(false); } public void UnlockLevel4() { unlockLevel4.SetActive(false); } public void UnlockLevel5() { unlockLevel5.SetActive(false); } public void UnlockLevel6() { unlockLevel6.SetActive(false); } public void UnlockLevel7() { unlockLevel7.SetActive(false); } public void UnlockLevel8() { unlockLevel8.SetActive(false); } public void UnlockLevel9() { unlockLevel9.SetActive(false); } public void UnlockLevel10() { unlockLevel10.SetActive(false); } }

Viewing all articles
Browse latest Browse all 1333

Trending Articles