Load error Babylon scene export after "Update environment texture"

Hello,

Short story:
I’m trying to update an environment texture in the sandbox, but after it, I can’t load an exported .babylon scene with the error Unable to load from file:scene (19).babylon: loadAssets of unknown. Does anyone have any idea why?

Detailed story:
It should be easy to reproduce my problem:
I use this simple glb model and load it to the sandbox. After that, I upload this environment with Inspector → Scene → “Update environment texture”. After that, I export .babylon scene and try to load it in a another sanbox, but receive the error: “Unable to load from file:scene (19).babylon: loadAssets of unknown”.
image

Hi and welcome to the Community.

Yes, but how do you upload it? Likely from local, what else? So, this will only create a blob link to be used inside this PG. I’m not 100% sure but I’d rather think that this link is not a permalink.


cc @carolhmj for confirmation

Yep you’re 100% correct :smiley:

@mawa
I’m uploading it into another sandbox

@carolhmj
Ok, got it. Thank you! Is there a way to make the environment texture permanent and export it with the .babylon scene export?

Just use the permalink already provided (or for any other environment, host it on your server or any trusted cloud app and use this link).

In your example using a BJS github asset, ez enough, just go in your script:

scene.environmentTexture = new BABYLON.CubeTexture(“https://raw.githubusercontent.com/BabylonJS/Assets/d2257b62a3507e9d905849db0c77c3392792b28c/environments/studio.env”, scene);

Edited the link (sry for that, I rushed it a little :face_with_hand_over_mouth:)
For more information on importing assets in the PG, visit this page of the doc

2 Likes

Yes, it works perfectly anywhere except in the sandbox. I guess it’s impossible to import your own environment in the sandbox and export it to the .babylon scene…

Yep the sandbox isn’t really intended for modifying permanently a scene, just visualizing

1 Like