Version: 2018.3 (switch to 2019.1)
LanguageEnglish
  • C#

EditorGUI.MultiPropertyField

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static void MultiPropertyField(Rect position, GUIContent[] subLabels, SerializedProperty valuesIterator, GUIContent label);
public static void MultiPropertyField(Rect position, GUIContent[] subLabels, SerializedProperty valuesIterator);

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

Makes 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.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答