Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

EditorGUI.MultiPropertyField

static function MultiPropertyField(position: Rect, subLabels: GUIContent[], valuesIterator: SerializedProperty, label: GUIContent): void;
static void MultiPropertyField(Rect position, GUIContent[] subLabels, SerializedProperty valuesIterator, GUIContent label);
static def MultiPropertyField(position as Rect, subLabels as GUIContent[], valuesIterator as SerializedProperty, label as GUIContent) as void
static function MultiPropertyField(position: Rect, subLabels: GUIContent[], valuesIterator: SerializedProperty): void;
static void MultiPropertyField(Rect position, GUIContent[] subLabels, SerializedProperty valuesIterator);
static def MultiPropertyField(position as Rect, subLabels as GUIContent[], valuesIterator as SerializedProperty) as void

Parameters

positionRectangle on the screen to use for the multi-property field.
valuesIteratorThe SerializedProperty of the first property to make a control for.
labelOptional label to use. If not specified the label of the property itself is used. Use GUIContent.none to not display a label at all.
subLabelsArray with small labels to show in front of each float field. There is room for one letter per field only.

Description

Make a multi-control with several property fields in the same line.

The array of labels determine how many properties are shown. No more than 4 properties should be used. The displayed SerializedProperties must be consecutive. The one provided in the valuesIterator argument should be the first of them.