This is my code, which saves the array value as an integer in a custom character creation tool for my game:
function PPSaveChar(){
PlayerPrefs.SetString("name",charName);
print (charName);
PlayerPrefs.SetInt("gender", objselect[0]);
PlayerPrefs.SetInt("head", objselect[1]);
PlayerPrefs.SetInt("feet", objselect[2]);
PlayerPrefs.SetInt("hat", objselect[3]);
PlayerPrefs.SetInt("hair", objselect[4]);
}
but there is no file created when I build it, upload it to my server, and play it! In fact when I try to run this function the player crashes.
↧