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
- Type: Class
- Namespace: UnityEngine.Search
- Assembly: UnityEngine.CoreModule
- Inherits from: PropertyAttribute
[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 |
|---|---|
| flags | Search view flags used to open the Object Picker in various states. |
| instantiableProviders | Search provider concrete types that will be instantiated and assigned to the Object Picker search context. |
| providerIds | A list of Search Provider IDs that will be used to create the search context. |
| query | Initial search query used to open the Object Picker window. |