private void DoInspectorGroupingGUI(NodeGUI node)
{
if (node.Data.GroupingKeywords == null) {
return;
}
EditorGUILayout.HelpBox("Grouping: Create group of assets.", MessageType.Info);
UpdateNodeName(node);
GUILayout.Space(10f);
//Show target configuration tab
DrawPlatformSelector(node);
using (new EditorGUILayout.VerticalScope(GUI.skin.box)) {
var disabledScope = DrawOverrideTargetToggle(node, node.Data.GroupingKeywords.ContainsValueOf(currentEditingGroup), (bool enabled) => {
using(new RecordUndoScope("Remove Target Grouping Keyword Settings", node, true)){
if(enabled) {
node.Data.GroupingKeywords[currentEditingGroup] = node.Data.GroupingKeywords.DefaultValue;
} else {
node.Data.GroupingKeywords.Remove(currentEditingGroup);
}
}
});
using (disabledScope) {
var newGroupingKeyword = EditorGUILayout.TextField("Grouping Keyword",node.Data.GroupingKeywords[currentEditingGroup]);
EditorGUILayout.HelpBox(
"Grouping Keyword requires \"*\" in itself. It assumes there is a pattern such as \"ID_0\" in incoming paths when configured as \"ID_*\" ",
MessageType.Info);
if (newGroupingKeyword != node.Data.GroupingKeywords[currentEditingGroup]) {
using(new RecordUndoScope("Change Grouping Keywords", node, true)){
node.Data.GroupingKeywords[currentEditingGroup] = newGroupingKeyword;
}
}
}
}
}