Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

First Time Tile User: How Does One Tag Individual Tiles Within TilePallete

Discussion in '2D' started by MisterSkitz, Nov 21, 2018.

  1. MisterSkitz

    MisterSkitz

    Joined:
    Sep 2, 2015
    Posts:
    833
    I have created some very primitive tiles to experiment with and they paint on as desired. However, I haven't found a way to tag each tile so that I can code what I want each surface to behave as. For example, tall grass would slow the player down. I want all tiles to have their own attributes.
     
  2. asacafrw35tyth

    asacafrw35tyth

    Joined:
    Nov 17, 2015
    Posts:
    8
    to do that, you will need to make a custom tile type that extends TileBase or Tile. you can put whatever data you like on that, including having it instantiate objects.
     
  3. MisterSkitz

    MisterSkitz

    Joined:
    Sep 2, 2015
    Posts:
    833
    How do I go about doing this? Do you have a good link for me to reference?