public override void OnInspectorGUI() { GUILayout.Label("Summary", EditorStyles.boldLabel); GUILayout.BeginVertical("Box"); GUILayout.Label(basicChar.Identity.FullName); UgreEditorTools.TwoLabels(basicChar.Gender.ToString(), basicChar.Race(true)); GUILayout.EndVertical(); UgreEditorTools.TwoBoldLabels("First name", "Last name"); GUILayout.BeginHorizontal(); basicChar.Identity.FirstName = EditorGUILayout.TextField(basicChar.Identity.FirstName); basicChar.Identity.LastName = EditorGUILayout.TextField(basicChar.Identity.LastName); GUILayout.EndHorizontal(); base.OnInspectorGUI(); }
protected void BaseDraw() { EditorGUI.BeginDisabledGroup(true); EditorGUILayout.ObjectField("Script: ", MonoScript.FromScriptableObject((BaseInfo)target), typeof(BaseInfo), false); EditorGUI.EndDisabledGroup(); EditorGUILayout.BeginVertical(); serializedObject.Update(); EditorGUILayout.PropertyField(icon); UgreEditorTools.TextAreaWithBoldLabel(perkTitle, "Perk title"); UgreEditorTools.TextAreaWithBoldLabel(perkInfo, "Perk info"); UgreEditorTools.TextAreaWithBoldLabel(perkEffects, "Perk effects"); UgreEditorTools.TwoBoldLabels("Max level", "Perk cost"); UgreEditorTools.TwoIntSliders(maxLevel, perkCost); serializedObject.ApplyModifiedProperties(); EditorGUILayout.EndVertical(); }