Hi!
I am looking for a way to simply put a “var myvar = 66;” on the SD card. or disc.
But I have no idea if I can do this.
I just want to have a var “myvar =” 66 “,” in my game to load at startup of the game
write and read functions
This way I could have better contained in my small games.
I need a simple way to do this. in javascript if possible.
Can you help me?
hi, sorry,
if a person want to help me, would be nice
i have misery to understand this
link, help , code? to help?..
i make my possible
i need help, please
Charles, I literally have no idea what your are trying to do.
Whether you want text on the SD card or a variable of type int? I have no idea what 66 types to in java, could be double.
Also you have managed to miss the sticky thread about reading/writing files http://forum.unity3d.com/threads/61198-Data-Storage-How-to-read-write-files
I can’t help but think that PlayerPrefs would be a much better solution to your problem, but since I don’t really understand your problem, who knows!
PlayerPrefs.SetString(“CharlesSays”, “var = 66”);
PlayerPrefs.SetInt(“var”, 66);
PlayerPrefs.SetFloat(“float var”, 66.0f);
Hi, thanks, if i undersdand, if i add the code : PlayerPrefs.SetInt(“var”, 66); , it will store a var into my android device? and i will be able to load the var in some days and use it in my game, to be able to continue the game?
if yes, how i make to get the var after? to got for use?
I think it’s what i need !! but want to know
@DTreble , it’s working! ““PlayerPrefs.”” thanks for your help. it’s simple and working on android too.
Now i can set and get ! many thanks