Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Animated tiles in tilemap

Discussion in '2D' started by HealthPotionStudios, Jul 15, 2019.

  1. HealthPotionStudios

    HealthPotionStudios

    Joined:
    May 30, 2017
    Posts:
    4
    Hello,

    Let's say I have a tilemap with a block of 50x50 tiles and right in the center is a single animated tile. Is it more efficient to place the animated tile in its own tilemap (only for animated tiles)? Does Unity have a way of optimizing one tile's animation without updating the whole map?
     
  2. HealthPotionStudios

    HealthPotionStudios

    Joined:
    May 30, 2017
    Posts:
    4
    This is general example. The specific use case will the surface waves of water within my entire level's art tilemap.
     
  3. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    When the TilemapRenderer is set to Chunk mode, it will update a chunk (group of Tiles) when there are changes to Tiles in the chunk if the chunk is currently displayed on screen/s. This includes Tile animation changes. Other chunks without any changes will not be affected.

    If the TilemapRenderer is set to Individual mode, then the Sprite of each Tile is updated on its own but loses any optimizations made for rendering Tiles in a chunk.
     
  4. HealthPotionStudios

    HealthPotionStudios

    Joined:
    May 30, 2017
    Posts:
    4
    Thank you very much. I did not realize they had a chunk mode. Is there any reason why you would want individual rendering mode instead of chunk?
     
  5. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    Individual mode will be for cases when you need each Sprite in a Tile to sort against other Renderers in the scene, especially when you expect certain Sprites to overlap.

    Chunk mode batches and renders groups of Tiles for speed, but will not be able to sort against other Renderers.