BabylonJS / Editor

Community managed visual editor for Babylon.js
http://editor.babylonjs.com/
841 stars 238 forks source link

Can‘t use inspector in Editor because unbalanced #296

Open HouLingLXH opened 3 years ago

HouLingLXH commented 3 years ago

When I open then inspector by scene.debugLayer.show(), and play , then I click the window, I get the disorder: AOFPEKX(OAAQQ))BBD4%~IG

julien-moreau commented 3 years ago

Hi @HouLingLXH can you open the devtools and see if you have errors ? It looks like the loading part of the inspector failed. As previous issue, would be awesome if we can use the forum instead for questions: https://forum.babylonjs.com/ :)

HouLingLXH commented 3 years ago

No error in devtools console。

HouLingLXH commented 3 years ago

When I import them in my scrpt: import "@babylonjs/core/Debug/debugLayer"; import "@babylonjs/inspector";

If run in Editor , I get the error: [ERROR]: An error happened: Cannot use import statement outside a module.

but I can see the inspector by Run in Itegrated Browser, like the picture.

When I don't import them ,i can see inspector by Run in Editor, but can't see it when i Run in Intergrated Brower:

babylon.inspector.bundle.js:1 Uncaught TypeError: Cannot read property 'GUI' of undefined at babylon.inspector.bundle.js:1 at babylon.inspector.bundle.js:1

Uncaught TypeError: Cannot read property 'Inspector' of undefined at DebugLayer../node_modules/@babylonjs/core/Debug/debugLayer.js.DebugLayer._createInspector (debugLayer.js:97) at debugLayer.js:164 at HTMLScriptElement.script.onload (tools.js:367)