2D Toolkit Forum
2D Toolkit => Support => Topic started by: FrameZet on December 26, 2012, 11:28:07 am
-
Hi,
Thank you for this awesome tool. Creating sprites is easy with it!
However, I've little syncing problem. When my "First animation" is playing and then I start "Second animation" it should get timing from the first one. I've very little programming experience, so could you please write code example (Unity script) how to do that.
Thank you for your help! :)
-
If you have 2 animated sprites,
anim1
and
anim2
Lets say anim1 is already playing, and you want to sync anim2 to it, do this:
anim2.Play(anim1.CurrentClip, anim1.ClipTimeSeconds);
That'll play anim2 in sync with anim1.
-
That works! Thanks!