Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Feature request - Animator controlled tiles

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

  1. michelex2005

    michelex2005

    Joined:
    Aug 17, 2019
    Posts:
    1
    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,092
    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.

     
unityunity