VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
void AVR.UEditor.Core.AVR_Settings_Editor.OnGUISettingsNode ( SettingsTreeNode  node)
inlineprivate

Definition at line 74 of file AVR_Settings_Editor.cs.

74  {
75  if(node.is_leaf()) {
76  string data = node.value;
77  if(bool.TryParse(data, out bool b)) {
78  node.value = EditorGUILayout.Toggle(node.name, b).ToString();
79  }
80  else if(float.TryParse(data, out float f)) {
81  node.value = EditorGUILayout.FloatField(node.name, f).ToString();
82  }
83  else {
84  node.value = EditorGUILayout.TextField(node.name, data);
85  }
86  }
87  else {
88  node.foldout = EditorGUILayout.Foldout(node.foldout, node.name, true);
89  EditorGUI.indentLevel++;
90  if(node.foldout) foreach(SettingsTreeNode n in node.get_children()) OnGUISettingsNode(n);
91  EditorGUI.indentLevel--;
92  }
93  }
SettingsTreeNode[] get_children()
void OnGUISettingsNode(SettingsTreeNode node)
Class representing a node from a settings-tree returned by AVR_Settings.build_tree() ...