Batched models disappear after reloading scene

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:
Project Link
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

Hi @davidpox,

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:

  1. Launch GameScene
  2. Without running the batcher, click To Other scene.
  3. Click To Game Scene.
  4. 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:

pc.app.batcher._batchList;

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.

1 Like

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

1 Like

ideally a simple minimal project with nothing else going on please

Sure, have made one here

1 Like