Load Inspector V2 in a plain webpage

Hi all,

I’m trying to use Inspector V2 on a simple webpage, so I’ve been trying to add it to the starter template ( Babylon.js docs ) using either one of these URLS in my script ref after the babylonjs include.

<script src="https://cdn.babylonjs.com/inspector/babylon.inspector-v2.bundle.js"></script>
<script src="https://cdn.babylonjs.com/inspector/babylon.inspector-v2.bundle.max.js"></script>

And then I just add the show Inspector line at the end of the script block

INSPECTOR.ShowInspector(scene);

But I noticed that even when loading the library there’s an error already.

Is there some other dependency I need to include in the page?

Thanks for your time.

1 Like

Hello and welcome!

Please remove all your legacy scripts

<script src="https://cdn.babylonjs.com/inspector/babylon.inspector-v2.bundle.js"></script>
<script src="https://cdn.babylonjs.com/inspector/babylon.inspector-v2.bundle.max.js"></script>

And try to use current Inspector version
<script src="``https://cdn.babylonjs.com/inspector/babylon.inspector.bundle.js``"></script>

2 Likes

Aaaa.. and then use this to show the inspector? Cause that brought up the interface for me.

INSPECTOR.Inspector.Show()

Thanks!

1 Like