- Home /
Question by
Er_ellison · Aug 12, 2017 at 02:09 PM ·
player
multiple PlayerPrefs
// ESTABLISH USER BASE INFO
PlayerPrefs.SetInt ("id" , id);
PlayerPrefs.SetFloat ("cash" , cash);
PlayerPrefs.SetFloat ("level" , level);
PlayerPrefs.SetFloat ("car_ids" , car_ids );
Debug.Log ("id: " + PlayerPrefs.GetInt("id")); // returns int number
Debug.Log ("cash: " + PlayerPrefs.GetFloat("cash")); // returns float number
Debug.Log ("level: " + PlayerPrefs.GetFloat("level")); // returns 0
Debug.Log ("car_ids: " + PlayerPrefs.GetFloat("car_ids")); // returns 0
THat was the code , why 2 last player prefs does not work and returns just a 0????
this is inside my start function and : id = 54; cash = 2000f; level = 120f; car_ids = 10f
Comment
Best Answer
Answer by Er_ellison · Aug 12, 2017 at 04:19 PM
i just found that , its been setted by default 0 values from editor
Your answer
Follow this Question
Related Questions
Object Disappearing when comes close to player. 1 Answer
Need Help on scripting football simulation game 0 Answers
Player Money not working 1 Answer
Moving player along path? 1 Answer
Bullet wont collide for the other player (PHOTON+UNITY) 1 Answer