Exemplo n.º 1
0
 /// <summary>
 /// Set a <see cref="KeyCode"/> value using <see cref="PlayerPrefs"/>
 /// </summary>
 /// <param name="key"></param>
 /// <param name="value"></param>
 public static void SetKeyCode(string key, KeyCode value)
 {
     PlayerPrefs.SetString(key, KeyCodeUtils.KeyCodeToString(value));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Get a <see cref="KeyCode"/> value using <see cref="PlayerPrefs"/>
 /// </summary>
 /// <param name="key"></param>
 /// <param name="defaultValue"></param>
 /// <returns></returns>
 public static KeyCode GetKeyCode(string key, KeyCode defaultValue)
 {
     return(KeyCodeUtils.StringToKeyCode(PlayerPrefs.GetString(key, KeyCodeUtils.KeyCodeToString(defaultValue))));
 }