Hey all, I’ve been attempting to batch (1500ish) models in my scene.
The batching on the first run works fine, reducing drawcalls to 6. However, when changing scenes and then changing back to the original scene, the batched models disappear completely. The drawcalls stay the same though.
I’ve made an example project that shows the issue here:
Direct game link
Load the game scene, press “Run Batching” in the bottom right, then wait a second, press “To other scene”, then in the new scene press “To Game Scene” and observe that the roads that were previously there have disappeared
I can indeed reproduce your issue, but I am not sure if it’s related to batching, yet.
If I do the following steps I am getting the same result:
- Launch GameScene
- Without running the batcher, click To Other scene.
- Click To Game Scene.
- Roads have disappeared.
Checking the batch list all along in the console and I can see the batch manager didn’t run at all, the list is empty:
Are you doing anything special on scene change?
Ah you’re right! On scene change I do nothing but destroy the old hierarchy
However, I just found that this issue doesn’t happen if I remove the batch group from the models.
Whilst removing the batch group from the models fixes it; is there a way we can get batching to work and not have the models disappear?
Is it a possible issue with Playcanvas, seeing as it simply breaks because I added a batch group to the model component?
it’s definitely possible for this to be an engine bug … can you please create a ticket with repro here and we’ll investigate: https://github.com/playcanvas/engine/issues
ideally a simple minimal project with nothing else going on please