CustomObjectIndexerAttribute(Type)
Register a new Indexing function bound to the specific type.
Read time 1 minuteLast updated 8 days ago
Definition
- Type: Constructor
- Namespace: UnityEditor.Search
- Assembly: UnityEditor
public CustomObjectIndexerAttribute(Type type)
Parameters
Type of object to be indexed.
Examples
[CustomObjectIndexer(typeof(SceneAsset), version = 2 /* update me when the code below changes */)]internal static void IndexSceneName(CustomObjectIndexerTarget context, ObjectIndexer indexer){ if (!(context.target is SceneAsset sceneAsset)) return; indexer.IndexWordComponents(context.documentIndex, sceneAsset.name);}