Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

How to define new Grid type for Tilemap.

Discussion in '2D' started by Lechuza, Jan 28, 2018.

  1. Lechuza

    Lechuza

    Joined:
    Oct 3, 2014
    Posts:
    19
    I noticed there's only rectangular grids for the Tilemap. I know they will probably add hex and isometric grids later down the road, hopefully sooner rather than later. I cannot wait however, so I was wondering if it is possible to define one myself without losing Tilemap functionality and doing it completely separate.

    Thanks in advance!
     
  2. Dunk86

    Dunk86

    Joined:
    May 10, 2015
    Posts:
    51
    I tried subclassing Grid at one point to see if I could reuse the structure for a game prototype that needed a triangle grid, but realised that it's really not designed to be extensible right now. Functions are private that should be protected - that sort of thing.

    Official support for Hex and Isometric grids would be super useful so I can add further compatibility to my Tiled TMX Importer project ;)
     
  3. Lechuza

    Lechuza

    Joined:
    Oct 3, 2014
    Posts:
    19
    Thanks Dunk for the reply. That's a real shame, hopefully they will make it extensible in the near future!
     
unityunity