hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
30 lines (16 loc) • 805 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [WorldManager](./server.worldmanager.md) > [getDefaultWorld](./server.worldmanager.getdefaultworld.md)
## WorldManager.getDefaultWorld() method
Gets the default world, creating it if it does not exist.
Use for: a single-world game or as a safe fallback when routing players. Do NOT use for: creating specialized worlds with unique options.
**Signature:**
```typescript
getDefaultWorld(): World;
```
**Returns:**
[World](./server.world.md)
The default world.
\*\*Side effects:\*\* Creates and starts a world if it does not yet exist.
\*\*Category:\*\* Core
## Remarks
Lazy-creates and auto-starts a default world if none exists.