public override void OnGUI(GUIContent label) { NamedVariable variable = value as NamedVariable; EditorGUILayout.TextField("Name", variable.Name); variable.VariableType = (NamedVariableType)EditorGUILayout.Popup((int)variable.VariableType, variable.VariableTypeNames); variable.SetValue(EditorTools.DrawFields(variable.GetValue())); }
private void DoListGUI() { EditorGUI.BeginChangeCheck(); for (int i = 0; i < this.m_List.Count; i++) { object value = this.m_List[i]; if (EditorTools.Titlebar(value, GetObjectMenu(i))) { EditorGUI.indentLevel += 1; EditorGUI.BeginDisabledGroup(true); EditorGUILayout.ObjectField("Script", EditorTools.FindMonoScript(value.GetType()), typeof(MonoScript), true); EditorGUI.EndDisabledGroup(); EditorTools.DrawFields(value); EditorGUI.indentLevel -= 1; } } if (EditorGUI.EndChangeCheck()) { onChange.Invoke(); } }