Model not loading on app.loadSceneHierarchy

Dear all,

I am succesfully loading and unloading a scene and the hierarchy thereof, however, when I go back to my main scene, most of the objects don’t seem to get rendered.
When I console.log an object based on their tag, instead of expecting “undefined” to show up, it does log the entity completely, and from a quick overview I can’t see anything that’s different from when the entity gets console.logged on the first initialisation round.

I unfortunately can not share a link to the project due to NDA reasons, but I am hoping that maybe someone has seen this before.

I have already applied the fix described here: pc.Application.getApplication().scenes.loadSceneHierarchy() broken?, so I am fairly confident that the scene gets destroyed and the next scene gets loaded correctly, according to the Chrome Dev Tools;
image
I also see some of the other materials and entities being loaded just fine, consistently over multiple scene changes.

Does anyone have an idea of where I should start looking as to where the model ends up, and how I can get the entity to show up / render again?

Thanks in advance,

Kris

1 Like

Without seeing the project, it’s going to be difficult to help as it can be a number of things.

You can try using my custom devtools to see what the scene hierarchy is at runtime when you can’t see your models:

The issues can be related to lights, cameras, entities not being added to the hierarchy, use of global variables, old references to entities in scripts, etc.

Any chance of reproducing the error in a clean public project?

Dear @yaustar ,

Thanks for your quick reply.
I have tried to set up a public project where I try to recreate the issue, but it seems that when I trigger a scenechange from my second scene into the “main” scene, that the entity does load and render. I am getting a bunch of errors from the input scripts whenever I try to move the camera, but if you want me to share this project let me know.

I have also used your custom devtools both before and after the reload, and they seem to log the same output every time.
Before reload: image
after reload: image

The model/entity in question being the GreenHouse_Building.

I can’t seem to figure out the difference between these two occurrences.
I do notice that if I use the Entity Picker, it logs no more than just the following:
image
Could this be because of a transparent plane that is in front of the camera? Or maybe the 2D Screen?
I just checked that clicking on a UI element does log to the console; image

@Ivolutio can I invite Yaustar into the project so he can see for himself? :grimacing:

Kind regards,

IHVD