DriftScript bindings · function

registerEntityModule

Build every component, prefab and system a module declares.

Explained in Setting up scripts.

function registerEntityModule(module: DriftModule, registry: ComponentRegistry, resources?: ResourceRegistry): RegisteredModule
import { registerEntityModule } from '@driftengine/script';

Parameters

ParameterTypeDescription
moduleDriftModule
registryComponentRegistry
resources?ResourceRegistry

In depth

Components are registered into registry as they are made, so a prefab or a system later in the same module finds them — and so a second module loaded against the same registry shares them rather than making a second store for one name.