I have a ton of values to save in PlayerPrefs, and I need to use them multiple times across multiple scripts. Instead of posting this :
PlayerPrefs.SetFloat("SizeValue", sizeValue);
PlayerPrefs.SetFloat("TailSize", tailSize);
PlayerPrefs.SetFloat("Marking", selectionGridInt);
PlayerPrefs.SetFloat("Mood", mood);
PlayerPrefs.SetFloat("Bulk", bulk);
PlayerPrefs.SetFloat("Voice", voice);
PlayerPrefs.SetFloat("EarSize", earSize);
PlayerPrefs.SetFloat("R", R);
PlayerPrefs.SetFloat("G", G);
PlayerPrefs.SetFloat("B", B);
PlayerPrefs.SetFloat("R2", R2);
PlayerPrefs.SetFloat("G2", G2);
PlayerPrefs.SetFloat("B2", B2);
PlayerPrefs.SetFloat("B3", B3);
PlayerPrefs.SetFloat("R3", R3);
PlayerPrefs.SetFloat("G3", G3);
PlayerPrefs.SetFloat("RU", RU);
PlayerPrefs.SetFloat("GU", GU);
PlayerPrefs.SetFloat("BU", BU);
PlayerPrefs.SetFloat("M2", M2);
PlayerPrefs.SetFloat("M1", M1);
PlayerPrefs.SetFloat("M3", M3);
PlayerPrefs.SetString("Name", characterName);
PlayerPrefs.SetString("Bio", characterBio);
is there anyway I can put this into some kind of array to reference from at all??
having to re-set variables in other scripts and then calling GetFloat or GetString is a lot of work and if I can do it quicker, why not.