hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
20 lines (11 loc) • 575 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [getPlayerEntityId](./client.hytopiaui.getplayerentityid.md)
## HytopiaUI.getPlayerEntityId() method
Gets the entity ID of the current player's entity. Returns undefined if the player entity is not yet initialized.
**Signature:**
```typescript
getPlayerEntityId(): number | undefined;
```
**Returns:**
number \| undefined
The player's entity ID, or undefined if not available