public override void OnInspectorGUI() { item = (Item)target; EditorGUILayout.LabelField("Summary"); EditorGUILayout.BeginVertical("Box"); UgreEditorTools.TwoLabels("Title: " + item.Title, "Id: " + item.ItemId); UgreEditorTools.TwoLabels("Type: " + item.Type, "Use: " + item.UseName); EditorGUILayout.LabelField(item.Desc, EditorStyles.textArea); EditorGUILayout.EndVertical(); base.OnInspectorGUI(); }
public override void OnInspectorGUI() { dropArea = GUILayoutUtility.GetRect(0.0f, 70.0f, GUILayout.ExpandWidth(true)); serializedObject.Update(); for (int i = 0; i < list.arraySize; i++) { EditorGUILayout.PropertyField(list.GetArrayElementAtIndex(i)); } UgreEditorTools.DropAreaGUI(dropArea, "Drop new item", HandleItem); serializedObject.ApplyModifiedProperties(); // base.OnInspectorGUI(); }
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(); }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { UgreEditorTools.ProperyWithDeleteBtn(position, label, property); }
public static void CreateCustomScript(MenuCommand cmd) { UgreEditorTools.SpawnCopyOfScript(PathToTemplate); }