Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SearchContextAttribute

This attribute can be attached to a component object field in order to have the ObjectField use the advanced Object Picker.
Read time 4 minutesLast updated 6 days ago

Definition

[AttributeUsage(AttributeTargets.Field)]public class SearchContextAttribute : PropertyAttribute

Examples

[SearchContext("t:mesh is:nested mesh", "asset")]public UnityEngine.Object assetMesh;

Constructors

Constructor

Description

SearchContextAttribute(System.String)Search context constructor used to add some search context to an object field.
SearchContextAttribute(System.String,System.String)Search context constructor used to add some search context to an object field.
SearchContextAttribute(System.String,System.String,UnityEngine.Search.SearchViewFlags)Search context constructor used to add some search context to an object field.
SearchContextAttribute(System.String,System.Type[])Search context constructor used to add some search context to an object field.
SearchContextAttribute(System.String,UnityEngine.Search.SearchViewFlags)Search context constructor used to add some search context to an object field.
SearchContextAttribute(System.String,UnityEngine.Search.SearchViewFlags,System.String,System.Type[])Search context constructor used to add some search context to an object field.
SearchContextAttribute(System.String,UnityEngine.Search.SearchViewFlags,System.Type[])Search context constructor used to add some search context to an object field.

Properties

Property

Description

flagsSearch view flags used to open the Object Picker in various states.
instantiableProvidersSearch provider concrete types that will be instantiated and assigned to the Object Picker search context.
providerIdsA list of Search Provider IDs that will be used to create the search context.
queryInitial search query used to open the Object Picker window.

Inheritance

Inherited Members