protected override void DrawPropertyLayout(GUIContent label) { string text = this.ValueEntry.SmartValue.text; int number = this.ValueEntry.SmartValue.number; Vector3 location = this.ValueEntry.SmartValue.location; Rect rect = EditorGUILayout.GetControlRect(); if (label != null) { rect = EditorGUI.PrefixLabel(rect, label); } rect = EditorGUILayout.GetControlRect(); GUIHelper.PushLabelWidth(75); text = SirenixEditorFields.TextField(rect.Split(0, 2), "Text", text); number = SirenixEditorFields.IntField(rect.Split(1, 2), "Number", number); location = SirenixEditorFields.Vector3Field("Location", location); GUIHelper.PopLabelWidth(); this.ValueEntry.SmartValue.text = text; this.ValueEntry.SmartValue.number = number; this.ValueEntry.SmartValue.location = location; }
protected override void DrawPropertyLayout(IPropertyValueEntry <PositionTarget> entry, GUIContent label) { EditorGUI.BeginChangeCheck(); var Position = SirenixEditorFields.Vector3Field("Position", entry.SmartValue.Position); var Rotation = SirenixEditorFields.QuaternionField("Rotation", entry.SmartValue.Rotation); if (EditorGUI.EndChangeCheck()) { entry.SmartValue = new PositionTarget() { Position = Position, Rotation = Rotation }; } }
protected override Vector3 DrawElement(Rect rect, Vector3 value) { return(SirenixEditorFields.Vector3Field(rect.Padding(2), value)); }