private static int GetKeyStrokeInt(PlayerPrefKey playerPrefKey, DefaultKeyStroke defaultKeyStroke) { if (!PlayerPrefs.HasKey(playerPrefKey.ToString())) { return(Convert.ToInt32(defaultKeyStroke)); } return(PlayerPrefs.GetInt(playerPrefKey.ToString())); }
public void ValueChangeCheck() { //Debug.Log("Value Changed -- " + inputField.text); if (inputField.text != "" & inputField.text != diffFromKey1.text & inputField.text != diffFromKey2.text) { var input = inputField.text.ToLower(); this.transform.Find("Button").GetComponentInChildren <TMP_Text>().text = input; PlayerPrefs.SetInt(playerPrefKey.ToString(), Convert.ToInt32(input[0])); Deactivate(); } }