On...Unity...I've assigned a button to execute this method. The problem is that every time I press this button the editor just stops. It doesn't even say the "Unity isn't responding" thingy. The same thing happens to built applications.
I've been wondering if I made a crucial mistake... As you see there are a lot of setters....
What did I do wrong?... I can't seem to find out...
public void ResetValue()
{
PlayerPrefs.DeleteAll();
PlayerPrefs.SetInt("Started", 1);
PlayerPrefs.SetInt("AdventureButton1", 1);
PlayerPrefs.SetInt("numOfSchools", 1);
PlayerPrefs.SetInt("Dogam0", 1);
PlayerPrefs.SetFloat("MaxConscience", 5f);
PlayerPrefs.SetInt("ConscienceTimePrice", 500);
PlayerPrefs.SetInt("PercentGoldPrice", 100);
PlayerPrefs.SetInt("PercentConsciencePrice", 100);
PlayerPrefs.SetInt("PercentAdventureConsciencePrice", 200);
PlayerPrefs.SetInt("MaxConsciencePrice", 700);
PlayerPrefs.SetFloat("ConscienceTime", 5f);
PlayerPrefs.SetFloat("PercentGold", 100f);
PlayerPrefs.SetFloat("PercentConscience", 100f);
PlayerPrefs.SetFloat("PercentAdventureConscience", 100f);
for (int i = 100; i < 300; i++)
{
PlayerPrefs.SetInt("deathProb" + i.ToString(), 50);
}
print("done");
}
I've been experimenting about when it lags. For now it seems if yo set the ints and the floats together at once then it would lag. If there is only ints or floats then it won't lag...hmm
↧