Exemplo n.º 1
0
    public static void ShowWindow()
    {
        ScriptableSettingsManager.Update();
        ScriptableSettingsWindow wnd = GetWindow <ScriptableSettingsWindow>();

        wnd.titleContent = new GUIContent("ScriptableSettings");
    }
Exemplo n.º 2
0
 private void DeleteTag(ScriptableTag tag)
 {
     if (EditorUtility.DisplayDialog($"Delete tag {tag.name}",
                                     $"Are you sure you want to delete the tag {tag.name}?", "Yes", "Cancel"))
     {
         ScriptableSettingsManager.DeleteTag(tag);
         PopulateTags(true);
         PopulatePresetList();
     }
 }
Exemplo n.º 3
0
    private static bool IsValidSettingsName(string nName)
    {
        if (nName == string.Empty)
        {
            return(false);
        }

        ScriptableSettingsManager gsm = ScriptableSettingsManager.Instance;

        for (int i = 0; i < gsm.ScriptableSettings.Count; i++)
        {
            if (gsm.ScriptableSettings[i].TabName == nName)
            {
                return(false);
            }
        }
        return(true);
    }
Exemplo n.º 4
0
 public static T GetDefault <T>() where  T : ScriptableSettings => ScriptableSettingsManager.Get <T>();
Exemplo n.º 5
0
 private void OnTagNameSelected(string obj)
 {
     ScriptableSettingsManager.CreateNewTag(obj);
     PopulatePresetList();
     PopulateTags(true);
 }