This works on 5.0.0-beta.4, loading local inspector bundle, in 5.0.0-rc.7 it tries loading the bundle from CDN (but fails, which is an another problem).
@RaananW: tagging you since I assume this has something to do with your changes to the build system, as there are no visible relevant code changes between the versions.
hmmm. I will look into that as soon as I can! seems odd, as the code didn’t change. Can I ask what bundler are you using so I can reproduce this locally?
Confirming that I’m seeing similar issue when trying to use inspector. Something changed after 5.0.0-rc.4. I believe it’s related to handling around @babylonjs/core/Legacy/legacy, but not yet positive. It appears that local ES6 version of the inspector is not being setup.
Seems not to be working yet. Different error now, related to the inspector.
debugLayer.ts:266 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'IsVisible')
at DebugLayer2.isVisible (debugLayer.ts:266:65)
at DebugLayer2._createInspector (debugLayer.ts:201:18)
at debugLayer.ts:304:22
Same error if importing sync (way I usually do it) or async (how @rassie did it). Here’s a codesandbox, if it helps:
can you try something for me? I can’t edit this, I am just wondering if that might be the issue.
Could you run “(window as any).INSPECTOR = undefined”" right after importing the inspector?
If that works I will push a fix that will be available in the next rc (12)