2D Toolkit Forum

2D Toolkit => Support => Topic started by: DahongPunyal on February 11, 2014, 02:17:40 am

Title: Ways to Batch tk2dSprites
Post by: DahongPunyal on February 11, 2014, 02:17:40 am
I am creating a GameObject and adding many tk2dSprites as its children programmatically. I want to add tk2dStaticSpriteBatcher to the parent GameObject to batch its children.

Do you have any idea of how can I manage to do it by code? Thanks!
Title: Re: Ways to Batch tk2dSprites
Post by: unikronsoftware on February 11, 2014, 09:36:20 am
Its in the docs.
http://2dtoolkit.com/docs/latest/advanced/scripting_static_sprite_batcher.html

You can't add sprites, but simply add stuff to the list in the batcher. Its a LOT faster than adding game objects in unity.
Title: Re: Ways to Batch tk2dSprites
Post by: DahongPunyal on February 11, 2014, 09:52:20 am
Oh, thank you! :D

So, I can't add sprites, I'll do it manually then. Thanks!