Hi! I am making a grid map consisting of tiles.
What is the best way to get the data from each tile(entity) when clicking on them?
This is needed to update a tile. E.g. click on a tile to change it from a grass tile to a water tile.
I currently have it set up so each tile is an entity with a script called tile that contains the info about the tile such as coordinates and tile type. They get spawned at runtime and their tile data is assigned when spawned. E.g initial tile data: coords: [0, 0] and type: ‘default’ is then updated when spawned to e.g coords: [1,2] and type: ‘grass’
Thanks in advance