Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
About SpriteID
« previous
next »
Print
Pages: [
1
]
Author
Topic: About SpriteID (Read 4703 times)
Companella
Newbie
Posts: 29
About SpriteID
«
on:
January 20, 2014, 09:47:02 am »
Hi all!
When I make a SpriteCollection, the spriteID is 58,30,0,7..... why not is 0, 1, 2, 3... ?
What inside rule to make ID?
I want to use a script adapte tk2dSprite, need linear indices to animate on Mecanim.
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: About SpriteID
«
Reply #1 on:
January 20, 2014, 11:39:08 am »
SpriteID is assigned in the order in which the sprites are added to the collection. If you aren't using your sprite collection explicitly anywhere, you can reorder it by writing an editor script to sort the tk2dSpriteCollection.textureParams array the way you want to. After that call tk2dSpriteCollectionBuilder.Rebuild( collection ) to rebuild it. Remember though if you have existing sprites using this collection, the references will be broken.
Logged
Companella
Newbie
Posts: 29
Re: About SpriteID
«
Reply #2 on:
January 20, 2014, 01:15:25 pm »
Oh, I drag imgs one by one, then it makes linear indices.
Thank you~
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
About SpriteID