2D Toolkit Forum
2D Toolkit => Support => Topic started by: Dipso on November 04, 2015, 07:40:45 am
-
Hi
Is there a way to set the platform per sprite collection?
Example:
Before I load a scene which contain sprites from the collection "MyCollection", I call a method such as:
tk2dSystem.SetSpriteCollectionPlatform("MyCollection", "1x")
This would override the default platform (tk2dSystem.CurrentPlatform) when it loads the sprite collection.
This can be helpful when building for a mobile device that has low-memory, but high screen resolution, and you want to use smaller atlases for specific sprites (especially ones that won't appear blurry at hi-res).
-
Hi,
There isn't a way to do this. However you do have the code and it is pretty straightforward to modify to do this if you want to. tk2dSpriteCollectionData.inst is where the choice happens - it just looks through all available collections to find the one that matches the current system platform, you just need to add whatever constraint you need on top of that.
-
Thanks for the feedback.
The code does seem straightforward to modify.