Best texture/sprite format for cross platform performance

Hello,

I am new to Unity but I have done some Cocos2D-iPhone development, and there I make spritesheets for all my sprites (I use TexturePacker for that) to get optimum performance from the iOS devices. For my first Unity project I am planning to make a 2D game, but in the future I want to dive into 3D also, so my question is really for both (are there any difference?).

I would like to deploy to both Mac/Windows/Linux and mobile (iOS/Android) and there are a lot I don’t know in this, but to get me started in the right direction I have these two initial questions.

  1. To get best performance, what format should my graphical assets be in? Should I make spritesheets in some specific format, and at what max size should they be?

  2. Different iOS devices has different max texture sizes I know, can and should I make different spritesheet/sprite sizes for each target or can Unity be set to handle this (scale down to device)?

Thank you
Søren

Texture format that you import into unity is up to you. You can use tga,tif,psd,bitmap,png,and jpeg. If a texture has transparency use psd,tga, or png. In your final build Unity will convert the texture as needed based on the platform you are building for.

It is recommended to use sprite altas sheets for optimizations, especially for mobile. You can go up to 2048x2048 for most mobile platforms. Maybe higher for pc/mac.

As for scaling textures to a device, yes this can be set through code or manually through the texture importer.

I just found the Sprite Packer option in Unity, this looks promising. Can I at runtime define what sprite atlas to load and make sure any loaded sprite atlas is unloaded when I switch scene? This could improve my memory usage a great deal.

Thank you
Søren

1 Like