<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [client](./client.md) &gt; [HytopiaUI](./client.hytopiaui.md) &gt; [getEntityIdByName](./client.hytopiaui.getentityidbyname.md)

## HytopiaUI.getEntityIdByName() method

Finds an entity by its name property and returns its ID. If multiple entities have the same name, returns the first one found.

**Signature:**

```typescript
getEntityIdByName(name: string): number | undefined;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

name


</td><td>

string


</td><td>

The exact name to search for (case-sensitive)


</td></tr>
</tbody></table>

**Returns:**

number \| undefined

The entity ID if found, undefined otherwise

