Unity Toolkit - scene fails to load in browser after adding any script

Hello, my Unity scene works fine and renders successfully in browser before I add any script, but when I add the DefaultCameraSystem or any custom TS file to camera/gameobjects, build succeeds but it does not render in browser (gets stuck at loading scene content).

Can someone please help me this ? Profile - MackeyK24 - Babylon.js

Thank you.

Can you record what happening… Also check the javascript console log as well

Hi, please find the video here - Babylon_.mp4 - Google Drive

For logs, in 3D URP project, it asks me to disable reflection probe blending for tier 3 graphics settings, that is already disabled. While in 3D Core, there are recommendations related to lighting that you can see in the video. Thanks.

@MackeyK24 Is there something I might be missing here?

Are there any console errors in the browser after you add the default camera script back?


@Pryme8 @MackeyK24

Did you do an npm install in the root folder of your project?

Im not to sure what would cause the DefaultCameraSystem to do that tbh.

Usually thats one of those script components you can just rely on.

@Pryme8 I installed node js at the default directory ProgramFiles/nodejs and npm was part of the package. I can see it is located in a different folder - node_modules.
In Babylon script compilation, should I make any changes- currently it refers to node.exe

go into your root project folder for your unity files in cmd and do an npm i

That might not be what it is, but if I remember right you used to have to do that.
@MackeyK24 may have changed that though.

@Pryme8 I installed npm in the root directory of the project and it detects the Babylon package as well but the problem still persists with the same log in the browser.

Also, there are a lot of namespace related errors in Visual Studio for DefaultCameraSystem, if that is any relevant.

Yo @AnupamChauhan i can tell from video what is going on. If you hit me up in a DM. we can setup a Google Meet or something so you can show me your screen and we can figure out what is going on. I suspect it is something in the typescript setup version

1 Like