Search Unity

Tilemap Chunk Culling Bounds Confusion

Discussion in '2D' started by JasonBricco, Jun 22, 2018.

  1. JasonBricco

    JasonBricco

    Joined:
    Jul 15, 2013
    Posts:
    936
    Hi all,

    I have a tilemap that can cover a 512x512 tile area. I load these tiles in from script.

    I noticed that when the 'detect chunk culling bounds' setting on the tilemap renderer is set to 'auto', the tilemap only renders when the origin of the tilemap is within the camera frustum. In other words, the bottom-left corner of my 512x512 area.

    This is the behavior when 'detect chunk culling bounds' is set to manual and the values are 0, 0, 0. If I change the values to, say, 16, 16, 16, then I can move 16 tiles away from the origin and still see the tilemap. Any farther and it stops rendering.

    So, if I make the bounds be 512x512, then I can see my entire tilemap correctly.

    Is this the intended behavior? Does this imply that the entire tilemap is being rendered at once and not having chunks that aren't visible in the view frustum culled?

    I thought the values were there to extend each chunk by a certain amount in case a tile on the chunk edge extends into another chunk. You could extend the chunk by a value to ensure those tiles are still visible.

    That isn't how it seems to work, though.

    This is on Unity 2018.1.5.
     
    Last edited: Jun 22, 2018
unityunity