Hello Guest

Author Topic: Accessing Sprite and Animation collections through Unity Legacy Animations  (Read 4931 times)

Kirb

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 36
    • View Profile
Is it possible in any way to use Unity's default animation editor to change an object from one sprite to another sprite, or changing to different animations?
Currently you only have access to the color channels and 'Play Automatically.' I ask because some of the framework I'm using are limited to using Mecanim or Legacy animations
in the workflow; so code-based isn't too viable an option. Is there an editor extension or alternative method that would make this possible?
« Last Edit: August 03, 2013, 07:21:18 am by Kirb »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
You will have to use the animation editor events (http://docs.unity3d.com/Documentation/Components/animeditor-AnimationEvents.html).
The problem with events are that it doesn't like overloaded functions, which the Play functions are. You should add some additional Play functions with unique names, eg.

void Anim_Play(string name) { Play(name); }

Do the same with the SetSprite function, and you should be good to go.