> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksinspectornames.md).

# Class ksInspectorNames

Namespace: [KS.Reactor.Client.Unity.Editor](/reactor/api-reference/ks.reactor.client.unity.editor.md)\
Assembly: KSUnity-Source.dll

Utility class for registering delegates to override the name of Unity objects in the inspector title bar. Delegates are registered with a type. When drawing an object's name in the inspector, it will first check the object's type for a delegate, and if none is found, it will check the base types recursively.

```csharp
public class ksInspectorNames
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [ksInspectorNames](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksinspectornames.md)

#### Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Methods

### Add(Type, NameGetter) <a href="#ks_reactor_client_unity_editor_ksinspectornames_add_system_type_ks_reactor_client_unity_editor_ksins" id="ks_reactor_client_unity_editor_ksinspectornames_add_system_type_ks_reactor_client_unity_editor_ksins"></a>

Adds a `handler` to override the inspector name for objects of the given `type`.

```csharp
public void Add(Type type, ksInspectorNames.NameGetter handler)
```

#### Parameters

`type` [Type](https://learn.microsoft.com/dotnet/api/system.type)

Type to register `handler` for.

`handler` [ksInspectorNames](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksinspectornames.md).[NameGetter](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksinspectornames/ks.reactor.client.unity.editor.ksinspectornames.namegetter.md)

Handler for getting the object name.

### Add\<T>(NameGetter\<T>) <a href="#ks_reactor_client_unity_editor_ksinspectornames_add__1_ks_reactor_client_unity_editor_ksinspectornam" id="ks_reactor_client_unity_editor_ksinspectornames_add__1_ks_reactor_client_unity_editor_ksinspectornam"></a>

Adds a `handler` to override the inspector name for objects of type `T`.

```csharp
public void Add<T>(ksInspectorNames.NameGetter<T> handler) where T : Object
```

#### Parameters

`handler` [ksInspectorNames](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksinspectornames.md).[NameGetter](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksinspectornames/ks.reactor.client.unity.editor.ksinspectornames.namegetter-1.md)\<T>

Handler for getting the object name.

#### Type Parameters

`T`

Type to register `handler` for.

### Get() <a href="#ks_reactor_client_unity_editor_ksinspectornames_get" id="ks_reactor_client_unity_editor_ksinspectornames_get"></a>

Gets the singleton instance.

```csharp
public static ksInspectorNames Get()
```

#### Returns

[ksInspectorNames](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksinspectornames.md)

Singleton instance

### GetDefaultName(Type) <a href="#ks_reactor_client_unity_editor_ksinspectornames_getdefaultname_system_type" id="ks_reactor_client_unity_editor_ksinspectornames_getdefaultname_system_type"></a>

Gets the default name for a `type`.

```csharp
public string GetDefaultName(Type type)
```

#### Parameters

`type` [Type](https://learn.microsoft.com/dotnet/api/system.type)

Type to get default name for.

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

Default name

### GetDefaultName\<T>() <a href="#ks_reactor_client_unity_editor_ksinspectornames_getdefaultname__1" id="ks_reactor_client_unity_editor_ksinspectornames_getdefaultname__1"></a>

Gets the default name for type `T`.

```csharp
public string GetDefaultName<T>() where T : Object
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

Default name

#### Type Parameters

`T`

Type to get default name for.

### Remove(Type) <a href="#ks_reactor_client_unity_editor_ksinspectornames_remove_system_type" id="ks_reactor_client_unity_editor_ksinspectornames_remove_system_type"></a>

Removes the handler for the given `type`. Objects of this `type` will use their default name in the inspector.

```csharp
public void Remove(Type type)
```

#### Parameters

`type` [Type](https://learn.microsoft.com/dotnet/api/system.type)

Type to remove handler for.

### Remove\<T>() <a href="#ks_reactor_client_unity_editor_ksinspectornames_remove__1" id="ks_reactor_client_unity_editor_ksinspectornames_remove__1"></a>

Removes the handler for type `T`. Objects of this type will use their default name in the inspector.

```csharp
public void Remove<T>() where T : Object
```

#### Type Parameters

`T`

Type to remove handler for.
