I am using playerprefs to check toggle input for an options menu. I want to tell if an int is even or odd. How would I do that? My script is:
using System.Collections;
public class test1 : MonoBehaviour {
public int pp1;
void Start ()
{
//PlayerPrefs.DeleteAll ();
PlayerPrefs.GetInt ("pplPref");
pp1 = PlayerPrefs.GetInt ("pplPref");
}
void OnMouseDown()
{
{
PlayerPrefs.SetInt ("pplPref", pp1 += 1);
PlayerPrefs.GetInt ("pplPref");
pp1 = PlayerPrefs.GetInt ("pplPref");
}
}
}
Thanks!
↧