Exemple #1
0
        public static bool ApplyPreset <T>(string preset)
        {
            if (!PresetData.IsPresetExists(preset, typeof(T)))
            {
                return(false);
            }

            return(true);
        }
Exemple #2
0
 public static void SaveToPresetData(object obj, string name)
 {
     if (string.IsNullOrEmpty(name))
     {
         EditorUtility.DisplayDialog("No preset name", "Please input preset name", "ok");
         return;
     }
     if (PresetData.IsPresetExists(name, obj.GetType()))
     {
         bool res = EditorUtility.DisplayDialog("Overwrite?", "Preset " + name + " is already exist.overwrite?", "ok", "cancel");
     }
     PresetData.SavePreset(name, obj);
 }