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): RegisteredModuleimport { registerEntityModule } from '@driftengine/script';Parameters
| Parameter | Type | Description |
|---|---|---|
module | DriftModule | |
registry | ComponentRegistry | |
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.