Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Feature request - Animator controlled tiles

Discussion in '2D Experimental Preview' started by michelex2005, Sep 2, 2020.

  1. michelex2005

    michelex2005

    Joined:
    Aug 17, 2019
    Posts:
    12
    I'm making a dungeon crawler like game, and for the levels I'm using tilesets, which are great. I wanted to implement traps on the floor (spikes that come out of the ground) and I started searching for a way to animate the tiles. I wanted a way to animate them through the classic animation editor since I wanted to control the tiles and the collider of the spikes in the same animation, but I couldn't find anything. As a workaround, I downloaded the animated 2D tiles script from github and create a separate animation for the collider. While this works, I had to put into the animated tiles 32 sprites which for the most part where the same, only repeated many times compared to others. Is there a simpler way to do this or has yet to be implemented? Thanks in advance.
     
  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,520
    What you did isn't wrong. That's one way.

    If you need the classic animation system, you could replace those tiles with a GameObject and SpriteRenderer. You can independently place this object in your scene or use a "prefab tile" to spawn it on the grid.