Hello Guest

Author Topic: Change Sprite Collection  (Read 3369 times)

Dipanker

  • Newbie
  • *
  • Posts: 17
    • View Profile
Change Sprite Collection
« 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Change Sprite Collection
« Reply #1 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.