Importing modules in automation scripts
masterAutomation scripts use standard ESM imports. The editor handles module resolution and auto-rewrites @babylonjs/* imports.
- Babylon.js Core:
import { ... } from "babylonjs"(also supports"babylonjs-gui","babylonjs-loaders","babylonjs-materials","babylonjs-post-process","babylonjs-procedural-textures","babylonjs-addons"). - Editor API:
import { UniqueNumber } from "babylonjs-editor". This resolves to the running editor instance at runtime.
Note: The editor injects its own Babylon instance, so objects created in your script automatically share the live scene.