◆ FoldoutObjectProperty()

static void FoldoutObjectProperty ( Rect  position,
SerializedProperty  prop,
GUIContent  label,
System.Type  type,
bool  allowSceneObjects,
bool  allowCreation,
params GUILayoutOption[]  options 
)
static
See also
UsageExample SoldierPropertyDrawer.cs
Parameters
positionRect that defines where to draw the control.
propThis SerializedProperty must be a class with visible children in order for the foldout to work. And it must be a savable asset, in order to show the save button.
labelLabel to display to the right of the foldout and save icons.
typeDefines the class that the SerilalizedObject Represents. This is the type that will be accepted by the standard Unity ObjectField's selector or drag-over. This type is also used for creating and saving new instances of the object (if a SerilazbleObject).
allowSceneObjectsSpecifies whether or not scene objects are valid references for this control. When false, only saved, project assets will be available for selection.
allowCreationIf the type is derived from SerilazbleObject, this option will allow the user to create a new instance of the object.
optionsGUILayoutOption array that will be used to render the control.

References ExpandableObjectPropertyDrawer.DrawProperty().

+ Here is the call graph for this function: