Hello Guest

Author Topic: Ways to Batch tk2dSprites  (Read 3466 times)

DahongPunyal

  • Newbie
  • *
  • Posts: 15
    • View Profile
Ways to Batch tk2dSprites
« 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!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Ways to Batch tk2dSprites
« Reply #1 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.

DahongPunyal

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Ways to Batch tk2dSprites
« Reply #2 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!