Beispiel #1
0
 public static void ClearAll(bool prompt)
 {
     if (!prompt || EditorUtility.DisplayDialog("Clear Editor Prefs", "Delete all the editor preferences?", "Yes", "No"))
     {
         PlayerPref.ClearAll();
     }
 }
Beispiel #2
0
        public static void ResetCvars(string[] values)
        {
            string binds = PlayerPref.Get <string>("binds");

            PlayerPref.ClearAll();
            PlayerPref.Set <string>("binds", binds);
            foreach (var item in Console.cvars)
            {
                Cvar data = item.Value;
                data.value.Set(data.defaultValue);
            }
            Console.AddLog("^10All stored ^3cvars^10 have been reset to default values.");
        }