Skip to content

API Interface RuntimePluginContext

github-actions[bot] edited this page Nov 24, 2026 · 1 revision

Interface: RuntimePluginContext

Defined in: src/plugins/runtimeContext.ts:38

Properties

debugLink

readonly debugLink: object;

Defined in: src/plugins/runtimeContext.ts:69

The debug link (ADR 0376): topic(name, load) registers a topic a build with debugging on serves to the editor and the Studio. load is an import() of the topic's code, which only such a build loads (a release export holds none of it). Removed again on deactivation.

topic()

topic(name, load): void;
Parameters
name

string

load

DebugTopicLoader

Returns

void


plugins

readonly plugins: PluginsView;

Defined in: src/plugins/runtimeContext.ts:44

The other plugins, as this one sees them (ADR 0374). plugins.isActive(name) is read at activation: true when the plugin is active for this host (and, for a named optional dependency, inside its version range), so the plugin registers its integration code only then. It activates again when an optional dependency is turned on or off.


take

readonly take: object;

Defined in: src/plugins/runtimeContext.ts:75

Takes (ADR 0348): source(name, load) registers a source of records a take writes beside audio's (record types 0x40..0x7e). load is an import() of the source's code, which only a take that starts loads. Removed again on deactivation.

source()

source(name, load): void;
Parameters
name

string

load

TakeSourceLoader

Returns

void

Methods

contribute()

contribute<T>(point, value): void;

Defined in: src/plugins/runtimeContext.ts:63

Add value to a contribution point another plugin owns (a physics backend); removed again on deactivation.

Type Parameters

T

T

Parameters

point

ContributionPoint<T>

value

T

Returns

void


registerComponents()

registerComponents(classes): void;

Defined in: src/plugins/runtimeContext.ts:49

Claim Components for the plugin. They keep their decorators (@component); deactivating the plugin unregisters them, so scene entries for them load as missing Components (ADR 0133).

Parameters

classes

readonly ComponentClass[]

Returns

void


registerSystems()

registerSystems(defs): void;

Defined in: src/plugins/runtimeContext.ts:51

Systems for the system catalog (ADR 0032); removed again when the plugin is deactivated.

Parameters

defs

readonly SystemDef[]

Returns

void


registerWorldService()

registerWorldService<L, I>(service): void;

Defined in: src/plugins/runtimeContext.ts:59

A lazily loaded per-World subsystem (ADR 0135).

Type Parameters

L

L

I

I

Parameters

service

WorldServiceDef<L, I>

Returns

void

Clone this wiki locally