Editorv4.0 use API : scene.debugLayer.show() ,get error

when i use the api: scene.debugLayer.show(),i get the error:

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
(anonymous) @ babylon.inspector.bundle.js:1
(anonymous) @ babylon.inspector.bundle.js:1
debugLayer.js:97 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)

Who can help me?

Welcome aboard!

This may help you:

Thanks for your help.

image
But ,when I click the axis button on inspector, I get the error :

utilityLayerRenderer.js:48 Uncaught TypeError: Cannot read property ‘getEngine’ of null
at new UtilityLayerRenderer (utilityLayerRenderer.js:48)
at Function.get (utilityLayerRenderer.js:212)
at new GizmoManager (gizmoManager.js:25)
at SceneTreeItemComponent…/components/sceneExplorer/entities/sceneTreeItemComponent.tsx.SceneTreeItemComponent.setGizmoMode (babylon.inspector.bundle.max.js:58661)
at onClick (babylon.inspector.bundle.max.js:58831)
at HTMLUnknownElement.callCallback (babylon.inspector.bundle.max.js:14175)
at Object.invokeGuardedCallbackDev (babylon.inspector.bundle.max.js:14224)
at invokeGuardedCallback (babylon.inspector.bundle.max.js:14279)
at invokeGuardedCallbackAndCatchFirstError (babylon.inspector.bundle.max.js:14293)
at executeDispatch (babylon.inspector.bundle.max.js:14376)

Can you help me? Thanks.

It’s going to be hard to help without a repro as this is working in the Playground.