Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SearchSelectorAttribute

Search selector attribute used to define how a custom value can be selected from a search item.
Read time 3 minutesLast updated 6 days ago

Definition

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]public class SearchSelectorAttribute : Attribute

Remarks

Here's an example to select the number of line of code of text assets.
select{p: *.cs, @path, @loc}.

Examples

[SearchSelector("loc", provider: "asset")]static object SelectLineOfCode(SearchSelectorArgs args){ TextAsset textAsset = args.current.ToObject<TextAsset>(); if (textAsset) return textAsset.text.Split('\n').Length; return null;}

Properties

Property

Description

cacheableSet the cacheable property if you do not want the search backend to pull cached values from the property database.

Inheritance

Inherited Members