2D Toolkit Forum

2D Toolkit => Support => Topic started by: Babaganoosh on August 18, 2013, 02:04:24 am

Title: Sprite Collection Question/Suggestion
Post by: Babaganoosh on August 18, 2013, 02:04:24 am
Hey Dinesh,

I've been shuffling around sprites in different sprite collections to compress them, reduce wasted space, etc. And obviously it's a pain because the reference breaks when the sprites change sprite collections. I was wondering why it's not done the same way you did fonts? I.e. everything in one unified name system. Mainly it'd just be nice if the references would update via a unified name system or even an automatic collection search. Thanks!

Edit: Actually apparently the font references break too when transferring, all very frustrating.
Title: Re: Sprite Collection Question/Suggestion
Post by: unikronsoftware on August 18, 2013, 11:55:43 am
Fonts are possible to transfer. Basically you create a new font in the new sprite collection, and use the other font data objects instead of creating a new one. That should work fine.

Sprites on the other hand are more complicated. Not impossible, but depends very much on what you're trying to change. If its just stuff in a scene, its perfectly doable - you need a script to catalog all sprites and the names, and then a script to restore the appropriate data later from a list of sprite collections. Its really hard to do this in a totally generic way which will work with any number of prefabs, asset bundles, etc. but if your needs are a bit constrained it should be doable.