DoObjectField
Draw an IMGUI advanced object field.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Method
- Namespace: UnityEditor.Search
- Assembly: UnityEditor
DoObjectField(Rect, SerializedProperty, Type, GUIContent, SearchContext, SearchViewFlags)
Draw an IMGUI advanced object field.
public static void DoObjectField(Rect position, SerializedProperty property, Type objType, GUIContent label, SearchContext context, SearchViewFlags searchViewFlags = SearchViewFlags.None)
Parameters
Position to draw the control in the current view.
Serialized property holding the selected object.
Type of the object to be picked.
Label displayed left of the control.
Search context used to open the advanced search picker.
Search view flags used to open the advanced search picker.
DoObjectField(Rect, Object, Type, GUIContent, SearchContext, SearchViewFlags)
Draw an IMGUI advanced object field.
public static Object DoObjectField(Rect position, Object obj, Type objType, GUIContent label, SearchContext context, SearchViewFlags searchViewFlags = SearchViewFlags.None)
Parameters
Position to draw the control in the current view.
Currently selected object.
Type of the object to be picked.
Label displayed left of the control.
Search context used to open the advanced search picker.
Search view flags used to open the advanced search picker.
Returns
Type | Description |
|---|---|
| Object | Returns the selected object. |