Search Unity

Can particle system be batched with normal game objects?

Discussion in 'General Graphics' started by therobby3, Mar 10, 2020.

  1. therobby3

    therobby3

    Joined:
    Jan 30, 2019
    Posts:
    131
    I am trying to optimize my batching and I am noticing that I can't get my particles to batch with the rest of my scene. I have everything packed into a texture atlas, and the particle system uses the same material and texture as the rest of my scene, however they will not batch with it. When I take a look at the frame debugger, I can easily see this as well. When I click on the frame that draws the particles, it says:

    "Objects have different batching keys. This is usually caused by using different vertex streams on Particle Systems, or by mixing Lines and Trails, or by mixing lit and unit geometry."

    Does any one know if this is normal, can particle system not be batched with non-particle system, despite using the same material? The particle effect in hand in a pretty simple one, nothing but a few leaf sprites dropping from it. However, it still needlessly increases my number of batching quite a bit by breaking it up. Any insight would be helpful. Thanks.
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Hi, particle systems cannot be batched with other types of renderer.

    Don’t worry about it - the material state will still be shared (ie fewer SetPass calls)
     
  3. therobby3

    therobby3

    Joined:
    Jan 30, 2019
    Posts:
    131
    Ah ok, thanks much for the info! At least now I know, so that saves me time tinkering around with it. >.<
     
    richardkettlewell likes this.