Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

Bug SpriteRenderer + Individual Mode TilemapRenderer batching broken in builds

Discussion in '2D Experimental Preview' started by Lo-renzo, Jun 4, 2021.

  1. Lo-renzo


    Apr 8, 2018
    Reporting here because bug reporter failed for some reason.

    Luckily this is easy to test.

    Reproduction steps
    1. create scene with Tilemap with its renderer in Individual Mode
    2. paint some tiles onto it
    3. create a SpriteRenderer with the same material as the TilemapRenderer and same sprite as the tile
    4. copy/paste that gameobject about the scene so that it would sort in front/behind some of the tiles, adjust Transparency Sort Axis if needed
    5. open Frame Debugger in Editor - SpriteRenderers and TilemapRenderer batch together as expected
    6. create development build
    7. open Frame Debugger for build - they don't batch

    I verified for 2020.1 (when batching feature introduced) and 2021.2 alpha.

    It might be wise to also test for SpriteRenderer/TilemapRenderer with Secondary Textures because there was batching bug (already fixed) for that earlier so perhaps it also suffers from the same Editor/Build issue.