2D Toolkit Forum

2D Toolkit => Support => Topic started by: Dajuice on February 19, 2013, 06:03:13 pm

Title: Accessing Commit command of a sprite collection?
Post by: Dajuice 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.
Title: Re: Accessing Commit command of a sprite collection?
Post by: unikronsoftware on February 19, 2013, 06:54:16 pm
Yes, but only from an editor script.
tk2dSpriteCollectionBuilder.Rebuild ( spriteCollection );