Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ObjectIndexer

A specialized SearchIndexer which provides methods to index a Unity Object from custom indexers.
Read time 3 minutesLast updated 5 days ago

Definition

public abstract class ObjectIndexer : SearchIndexer, IDisposable

Remarks

The ObjectIndexer can only be used in the context of a CustomObjectIndexerAttribute and therefore cannot be instanciated explicitly.
[CustomObjectIndexer(typeof(Collider), version = 3)] static void IndexObjectSize(CustomObjectIndexerTarget target, ObjectIndexer indexer) { var collider = target.target as Collider; if (collider == null) return; var totalSize = CustomSelectors.ComputeColliderSize(collider); indexer.IndexNumber(target.documentIndex, "collidersize", totalSize); }
Note that you can use all of the SearchIndexer
Add*
indexing methods to add words, properties and numbers to the search index database. You can also use the following higher level functions (i.e. IndexWord, IndexNumber, IndexProperty, IndexWordComponents and IndexPropertyComponents) to index common Unity Object properties.

Methods

Method

Description

IndexNumberAdds a key-number value pair to the index. The key won't be added with variations.
IndexPropertyAdds a property value to the index. A property is specified with a key and a string value.
IndexPropertyComponentsIndexes multiple variations of a property value.
IndexWordAdds a new word coming from a specific document to the index.
IndexWordComponentsSplits a word into multiple variations.

Inheritance