2D Toolkit > FAQs
[Solved] How to swap "Anim Lib"
(1/1)
christianboutin:
Just doing a quick repost of the Q&A about Anim Lib in the 2D Toolkit thread on the Unity Forums in case people look for the solution over here:
Question was: How to swap "Anim Lib" with code.
Keep in mind that you should have the new animated sprite in a "resources" folder
--- Code: ---sprite = GetComponent<tk2dAnimatedSprite>();
sprite.anim = (tk2dSpriteAnimation)Resources.Load ("new_anim_sprite_name", typeof(tk2dSpriteAnimation));
sprite.Play ("anim_clip_name");
--- End code ---
Navigation
[0] Message Index
Go to full version