My project uses a lot of tilemaps. A lot. There are several grids that I use to manage these tilemaps.
Recently, I’ve been using a grid cell size of 0.1 on the X and Y, which gives me a crazy amount of flexibility when it comes to placing tiles. The tiles that I use are not your typical grid based tiles. They are all over the place in terms of sprite sizes (I use sprite atlases to mange my sprites). To get the look I’m after, I need to be able to place tiles in such a way that allows me to move them freely without being locked to a grid. However, I still need to use tilemaps, otherwise I’d have 10’s of thousands of game objects, and that’s not good.
The lowest I typically make my cell size is 0.3 on the X and Y. This still gives me flexibility when placing tiles, but I wanted to try and go even smaller. Does this smaller cell size result in a performance loss due to some internal calculations with tilemaps?
For reference, I have a few, very large tilemaps that I split into sections for performance reasons. These tilemaps are in a grid with a cell size of 0.3 on the X and Y. I also created a few smaller tilemaps inside another grid with a cell size of 0.1 on the X and Y. Even in scene view, the large tilemaps inside the grid with the larger cell size gives me better performance (again, even in scene view and not an actual build) than the much smaller tilemaps inside the grid with the smaller cell size. This leads me to believe that the smaller the cell size, the greater the impact on performance.
I just wanted some confirmation on this, aside from my observations. For now, a cell size of 0.3 on the X and Y gives me the best performance overall, so this seems like the best choice, but I couldn’t find any mention of cell size with regards to performance in the Docs, but perhaps it’s mentioned elsewhere?