# CustomObjectIndexerAttribute(Type)

> Register a new Indexing function bound to the specific type.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEditor.Search](/engine/6000.6/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

```csharp
public CustomObjectIndexerAttribute(Type type)
```

### Parameters

**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): Type of object to be indexed.

### Examples

```csharp
[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);
}
```
