Hello Guest

Author Topic: Accessing Commit command of a sprite collection?  (Read 3183 times)

Dajuice

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 45
    • View Profile
Accessing Commit command of a sprite collection?
« on: February 19, 2013, 06:03:13 pm »
Hi,
Since I've been messing around and rearranging my atlases many times for optimisation sake and as the scope of the game grows, I made a script that changes the sprite's Collection while keeping it's graphism, providing the image is in both, the source and target collection. Everything works fine but I can't get the sprite collection to commit the changes (to the collection data) automatically, which could lead to some unwanted effects if one forgets to do this. Any way to force or access the commit or Rebuild functions of the collections?

Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Accessing Commit command of a sprite collection?
« Reply #1 on: February 19, 2013, 06:54:16 pm »
Yes, but only from an editor script.
tk2dSpriteCollectionBuilder.Rebuild ( spriteCollection );