I'm working on a 2d game and I'm using equipment viewers to display the players armor. The armor sprites have their own animations.The idea being the armor animates on a layer on top of the player, so it looks like the player sprite is wearing the armor. However the problem is I can't figure out how to tell the prefab spawned by the viewer to animate. I'm using Mecanim and the parameters aren't being set. Is there a way to play auto animations on equipment? I know I can trigger animations on equipment viewers via events, but I'm not sure how I would do that for things like walking. Thanks!
  • Hm, I don't think that's currently possible out of the box. Maybe there's a way in mecanim to link 2 animators together, or play animations on child objects in an animator controller?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Have you looked at Unity animation events or mecanim animation layers? With events you should be able to trigger animations to start based on specific points being triggered/played in another animation.

    Also check out Unity's State Machine Behaviours. They're tiny little scripts that are attached directly to an animation state in mecanim, that can be used to do really anything you can code up. The example at the bottom of the documentation *might* be something like what you're trying to do.
    My little chunk of the internet: http://artemic.com
  • Thanks for the replies. Luckily my game is simple enough that I should be able to find a solution to get the animation to play. I just wanted to make sure there wasn't something simple I missed that would let the Ork auto animation take care of things. Cheers!
Sign In or Register to comment.