2D Toolkit Forum

2D Toolkit => Support => Topic started by: MildMania on October 10, 2014, 08:11:57 pm

Title: Getting/Changing SpriteCollection by string, possible?
Post by: MildMania on October 10, 2014, 08:11:57 pm
Hello,

I want to change spritecollection of sprite by giving string as parameter? Like .SetSpriteCollection("MyCollection5") is such thing possible?
Title: Re: Getting/Changing SpriteCollection by string, possible?
Post by: unikronsoftware on October 10, 2014, 09:18:25 pm
No it isnt, but you can put the sprite collection data object in a resources folder and use Resources.Load to load it and SetSprite(loadedSpriteCollection, "spriteName");