Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - christianboutin

Pages: [1]
FAQs / [Solved] How to swap "Anim Lib"
« on: January 28, 2012, 04:10:30 pm »
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: [Select]
sprite = GetComponent<tk2dAnimatedSprite>();
sprite.anim = (tk2dSpriteAnimation)Resources.Load ("new_anim_sprite_name", typeof(tk2dSpriteAnimation));
sprite.Play ("anim_clip_name");

Pages: [1]