Version: 2023.2
LanguageEnglish
  • C#

SearchContextAttribute

class in UnityEngine.Search

/

Inherits from:PropertyAttribute

/

Implemented in:UnityEngine.CoreModule

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

Description

This attribute can be attached to a component object field in order to have the ObjectField use the advanced Object Picker.

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

Properties

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.

Constructors

SearchContextAttributeSearch context constructor used to add some search context to an object field.

Inherited Members

Properties

orderOptional field to specify the order that multiple DecorationDrawers should be drawn in.