Search Unity

too much batches.

Discussion in '2D' started by lordzeon, Jul 5, 2018.

  1. lordzeon

    lordzeon

    Joined:
    Jun 1, 2018
    Posts:
    44
    Hi, i decided to consult the experts for my simple project because i don´t know what else to do. In my tilemap based project i had to make drop a the a tilemap for the terrain and replace it with individual tiles with a shader from shadero, i made this to have all the control i need for the tiles and its shader parameters. But the problem is that now i have lot of batches for the basic scene, like 300 or 400, if i change to tilemap, the batches drop significantly, but im getting unexpected results with the lighting because of that.

    what i tried to reduce the batches is:
    - some mesh combiners in Asset Store, even making one myself (changing the sprite renderer to mesh and a quad)
    - set packing tag on the textures for the tiles
    - create a texture atlas with the tile textures
    - set the sprite tiles as static (to render as static batch)

    in every try, the batches remain the same, its running 320 to 400 FPS in my PC but i think i will need to optimice this later to make it good for mobiles.

    Do yo know what can i do to solve this? im using only 1 shader for every tile, only changing the texture, and they are static, don´t move, don´t change after the initial setup until the destroy.
     
  2. vambier

    vambier

    Joined:
    Oct 1, 2012
    Posts:
    102
    Did you ever find a solution for this?