- Home /
Highlighting Individual Tile Squares
I'm taking the first steps in creating an RPG using Unity. I figure I could be using anything up to a 50x50 tile map at a time, so I would like to be able to support up to 2500 tiles at a time.
Many of the tutorials I've seen involve creating an individual plane gameObject for each tile in the game, but 2500 tiles starts pushing the limits of what Unity can do fast and efficiently. I've decided to use a grid projector onto terrain for the visual representation of the squares and simply divide the mathematically for functionality. The issue comes when I want to change the color of individual squares to indicate "selection". See below:
In theory you could have a projector or translucent object for every tile in the game or simply create projectors or translucent objects when/where they are needed, but this selection could possibly cover the entire map, and thus we are back up to 2500 gameObjects again. Is there a solution here or must I bite the 2500 gameObject bullet?
Some principles for using a single mesh can be found in this video series : http://www.youtube.com/playlist?list=PLbghT7$$anonymous$$mckI4qGA0Wm_TZS8LVrqS47I9R