Skip to content

API Function worldService

github-actions[bot] edited this page Nov 28, 2026 · 7 revisions

Function: worldService()

Call Signature

function worldService<T>(key): T | null;

Defined in: src/engine/core/worldServices.ts:381

The service key names in a World, or null while that World isn't running it. Without a World, the current one (the World whose frame is running, else the Engine's default World).

Type Parameters

T

T

Parameters

key

WorldServiceKey<T>

Returns

T | null

Call Signature

function worldService<T>(world, key): T | null;

Defined in: src/engine/core/worldServices.ts:382

The service key names in a World, or null while that World isn't running it. Without a World, the current one (the World whose frame is running, else the Engine's default World).

Type Parameters

T

T

Parameters

world

WorldHandle | null | undefined

key

WorldServiceKey<T>

Returns

T | null

Clone this wiki locally