hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
66 lines (32 loc) • 1.01 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [PlayerUI](./server.playerui.md) > [load](./server.playerui.load.md)
## PlayerUI.load() method
Loads client UI for the player, replacing any existing UI.
Use for: switching to a new UI screen or resetting the UI. Do NOT use for: incremental overlays; use `PlayerUI.append`<!-- -->.
**Signature:**
```typescript
load(htmlUri: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
htmlUri
</td><td>
string
</td><td>
The UI HTML URI to load.
\*\*Requires:\*\* Player must be in a world.
\*\*Side effects:\*\* Emits `PlayerUIEvent.LOAD`<!-- -->.
\*\*Category:\*\* Players
</td></tr>
</tbody></table>
**Returns:**
void
## Remarks
If used with `PlayerUI.append` in the same tick, the load occurs first.