Hello Guest

Author Topic: tk2d animation on Mecanim  (Read 5653 times)

Companella

  • Newbie
  • *
  • Posts: 29
    • View Profile
tk2d animation on Mecanim
« on: January 18, 2014, 03:02:30 am »
Hi all!
tk2d animation is a very good system, but it not work on Mecanim.
Now, I use tk2d frame animation(disable but autoplay), and also use a xxx.anim that at one frame enable the tk2d frame animation.  This way work well.

Actually, this way has many problem:
1. Can't use color, alpha, transform animations in one animation clip.
2. Useless animation clip time scale value.
3. Mecanim state transition need call another script to stop tk2d frame animation.

Help me please :( :(

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2d animation on Mecanim
« Reply #1 on: January 18, 2014, 11:30:41 pm »
That is a unity limitation - it doesn't let you animate properties in c# just from c++, i.e. their own built in components. You can use a more inefficient adapter like posted on this forum to use that. You can call functions, again with limitations - they can't be overloaded. If you really want to use unity animation system with this (in addition to filing a bug report so they will fix this), you could add an adapter script to do that.

Companella

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: tk2d animation on Mecanim
« Reply #2 on: January 19, 2014, 05:11:38 am »
Thanks for your advice. Now I use a script for change tk2dSprite's collection, frame and color, by the Update().  It works on Mecanim well.