예제 #1
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();
     }
 }
예제 #2
0
 private void OnToggleTag(ScriptableTag scriptableSettingsTag, ChangeEvent <bool> evt)
 {
     if (_activeTags.Contains(scriptableSettingsTag))
     {
         _activeTags.Remove(scriptableSettingsTag);
     }
     else
     {
         _activeTags.Add(scriptableSettingsTag);
     }
     PopulatePresetList();
 }
예제 #3
0
    private void OnSettingsTagToggle(ScriptableObject scriptableSettings, ScriptableTag tag,
                                     ChangeEvent <bool> evt)
    {
        if (evt.newValue)
        {
            tag.Elements.Add(scriptableSettings);
        }
        else
        {
            tag.Elements.Remove(scriptableSettings);
        }

        PopulatePresetList();
    }