import_namespace
Imports a namespace, returning a table of the types, functions, values, events and exports in it by name.
Bevy types with bindings live in a namespace per category (
math,ecs,transform,ui, …), BMS’ own types and functions inbms, any other type in the namespace named after the crate defining it. Namespaces defined by scripts start withscript..local bms = import_namespace("bms") local Vec3 = import_namespace("math").Vec3 bms.world.spawn()Fails with a list of similar namespaces if the namespace does not exist.
Arguments
| Name | Type | Documentation |
|---|---|---|
| arg1 | String | No Documentation 🚧 |
Returns
| Name | Type | Documentation |
|---|---|---|
| namespace | ScriptValue | a table of the contents of the namespace keyed by name. |