void CreateAbilityTag(List <string> list, EEditor_AbilityTagType tagType, string name) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(name + " : "); if (GUILayout.Button("+", GUILayout.MaxWidth(80))) { tagWidgitSelectType = tagType; Window_AbilityTagEditor.Init(list, OnAbilityTagsChange); } if (GUILayout.Button("Clear", GUILayout.MaxWidth(40))) { list.Clear(); } EditorGUILayout.EndHorizontal(); ++EditorGUI.indentLevel; if (list != null) { for (int i = 0; i < list.Count; i++) { EditorGUILayout.LabelField(list[i]); } } --EditorGUI.indentLevel; EditorGUILayout.Space(5); }
//[MenuItem("EditorGUILayout/Tag2")] public static void Init(List <string> nowTagList = null, Action <List <string> > valueChangedCallback = null) { ReadConfig(); OnValueChanged = valueChangedCallback; Window_AbilityTagEditor window = (Window_AbilityTagEditor)EditorWindow.GetWindow(typeof(Window_AbilityTagEditor)); window.titleContent = new GUIContent("AbilityTagManager"); window.Show(); InitToggle(nowTagList); }
public void OnToggleChanged(bool inToggle) { bToggle = inToggle; if (inToggle) { FTagNode temp = parent; while (temp != null) { temp.bToggle = true; temp = temp.parent; } } else { OnToggleOff(); } Window_AbilityTagEditor.OnValueChanged?.Invoke(Window_AbilityTagEditor.GetSelectedTags()); }