Skip to content

SceneHookRegistry

Defined in: SceneHooks.ts:31

Internal

Registry of scene hooks. Held by the engine, consumed by the SceneManager.

new SceneHookRegistry(): SceneHookRegistry

SceneHookRegistry

_setErrorBoundary(boundary): void

Defined in: SceneHooks.ts:41

Internal

Wire the error boundary. Called once from Engine’s constructor, since this registry is constructed directly rather than resolved through EngineContext.

ErrorBoundary

void


register(hooks): () => void

Defined in: SceneHooks.ts:45

SceneHooks

() => void


runAfterExit(scene): void

Defined in: SceneHooks.ts:80

Run all afterExit hooks. A throwing hook is reported through the error boundary — recorded in Inspector.getErrors().callbackErrors and logged — and not rethrown, so one failing plugin doesn’t block teardown of the rest. afterExit is typed void-returning but an async one compiles against that signature; its rejection is reported the same way, after the remaining hooks have already run.

Scene

void


runBeforeEnter(scene): Promise<void>

Defined in: SceneHooks.ts:58

Run all beforeEnter hooks serially. A throwing hook is reported through the error boundary and rethrown, stopping later hooks — propagation to the caller (SceneManager) is unchanged.

Scene

Promise<void>

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/core.md.