2D Toolkit Forum

2D Toolkit => Support => Topic started by: Dipanker on October 15, 2013, 04:23:00 pm

Title: Change Sprite Collection
Post by: Dipanker on October 15, 2013, 04:23:00 pm
Hi
   How can I change the Sprite Collection of particular sprite object if the current sprite is not found in the  current collection at run time.


   Thanks.
Title: Re: Change Sprite Collection
Post by: unikronsoftware on October 15, 2013, 10:14:20 pm
You need a reference to a sprite collection, and then assign it using SetSprite(newCollection, "Name"); How you get the collection is up to you, you can have a reference to a tk2dSpriteCollectionData object, or load it using Resources.Load.