Skip to content

Commit a2c2cbe

Browse files
Julien Moreau-Mathisjulien-moreau
authored andcommitted
fix: include scene to preload assets in babylonjs-editor-tools
1 parent 5bc1cac commit a2c2cbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/src/loading/script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const scriptAssetsCache = new Map<string, any>();
1919
* @internal
2020
*/
2121
export async function _preloadScriptsAssets(scene: Scene, rootUrl: string) {
22-
const nodes = [...scene.transformNodes, ...scene.meshes, ...scene.lights, ...scene.cameras];
22+
const nodes = [scene, ...scene.transformNodes, ...scene.meshes, ...scene.lights, ...scene.cameras];
2323

2424
const scripts = nodes
2525
.filter((node) => node.metadata?.scripts?.length)

0 commit comments

Comments
 (0)