Hello Guest

Author Topic: Getting a list of all the sprite collections  (Read 3287 times)

Francinium

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
Getting a list of all the sprite collections
« on: March 02, 2014, 01:36:31 am »
Hey,
I'm wondering what would be the best way to go about getting a list of all my built sprite collections similar to the dropdown list you see on a sprite in the inspector.

I'm trying to streamline the way I build certain objects and it would be helpful to look through my list of collections and find the correct one by looking at its collection name.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Getting a list of all the sprite collections
« Reply #1 on: March 02, 2014, 09:10:24 pm »
If you need a sprite collection picker, use the same code as the internal sprite picker. Pretty much this line here in tkd2SpriteEditor.cs
      tk2dSpriteGuiUtility.SpriteSelector( targetSprites[0].Collection, targetSprites[0].spriteId, spriteChangedCallbackInstance, null );


Francinium

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Getting a list of all the sprite collections
« Reply #2 on: March 03, 2014, 12:50:25 am »
Did the trick, thanks!