- Home /
Need help with tilemap render, it's weird
I'm developing a 2d game base tilemap, I have about 10 maps in game, the size of each tilemap is about 100*100 with 4 layers. I used SuperTiled2Unity import my tmx map. And I found a weird question today :
As you see, there is nothing in camera render range but the tris and verts are not 0. the same as when camera above tiles. But it is ok when camera under or right of tiles.
By the way ,the tiles you see from part of a whole map. The camera seems to rendered tiles outside it's range. In a large map, this problem causes too much tris and verts rendering and poor performance on mobile phones. I don't understand why and how to handle this.
Here are my thoughts:
Maybe settings fault, I use LWRP and pixel perfect camera. One of them caused the problem.
Maybe resolution related. I don't know.
Maybe tilemap render base on left top of camera position, and there is a render range that I don't know.
Somebody help me please! I really need to solve this question.
Answer by ffxr · May 04, 2020 at 03:16 PM
I did some test in the issue. When one gameobject in camera range with full rect mesh type, it show 4 verts and 2 tris . It's correct. But in tilemap it render about four times the camera size tiles (even more) and made too much verts and tris.
Your answer
Follow this Question
Related Questions
Tile Collision Detection Not Always Working 3 Answers
Clamping tilemaps to screen (without moving camera)? 0 Answers
How can I make a large 2d tile map into mesh for easier rendering 1 Answer
Need help finding a library/solution for efficient 2D tilemap rendering, collisions and interaction. 1 Answer
2D Tilemap Collisions 1 Answer