unity MOBILE mobile best practices # Texture quality - [Mobile Max Texture Size](http://answers.unity3d.com/questions/563094/mobile-max-texture-size.html) - [Documentation for 2D textures](http://docs.unity3d.com/Manual/class-TextureImporter.html) # How do I choose an optimal texture size for a mobile Unity game? http://gamedev.stackexchange.com/questions/87208/how-do-i-choose-an-optimal-texture-size-for-a-mobile-unity-game "The first thing to note in unity is that it's possible to have platform specific import settings in which you can dictate the maximum resolution for textures on a given platform. This is controlled in the texture importer window. The settings can also be toggled by scripts." - [Image Size Altered Upon Import](http://answers.unity3d.com/questions/241605/image-size-altered-upon-import.html) # Optimization - [Optimizing_Unity_Games_for_Mobile_Platforms.pdf](http://malideveloper.arm.com/downloads/Unite_2013-Optimizing_Unity_Games_for_Mobile_Platforms.pdf) - [Power of 2](http://answers.unity3d.com/questions/223832/texture-size.html) # Texture Sizes Ideally texture sizes should be powers of two on the sides. These sizes are as follows: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 or 2048 pixels. The textures do not have to be square, i.e. width can be different from height. It is possible to use other (non power of two) texture sizes with Unity. Non power of two texture sizes work best when used on GUI Textures, however if used on anything else they will be converted to an uncompressed RGBA 32 bit format. That means they will take up more video memory (compared to PVRT(iOS)/DXT(Desktop) compressed textures), will be slower to load and slower to render (if you are on iOS mode). In general you'll use non power of two sizes only for GUI purposes. Non power of two texture assets can be scaled up at import time using the Non Power of 2 option in the advanced texture type in the import settings. Unity will scale texture contents as requested, and in the game they will behave just like any other texture, so they can still be compressed and very fast to load. - [Make better textures for games, 'Power of two' & proper image dimensions](http://www.katsbits.com/tutorials/textures/make-better-textures-correct-size-and-power-of-two.php) Although textures might be automatically resized once loaded, a major side-effect of this relates to the way textures then tend to become blurred, fuzzy or in some cases significantly corrupted as a result. This happens because in resizing the asset, the necessary data required to 'fill the gaps' has to extrapolate from whatever is available with the effect that the fidelity of fine details - the freckles of a characters skin, the pattern of fabric on a piece of furniture - degrades as they are stretched across a surface, re-sampled and changed. For example, an image that's 239x216 (51,624 pixels) is missing the additional 13,912 pixels that would otherwise make it a correctly proportioned, and valid, 256x256 image (65,536 pixels). As this 'extra' data doesn't initially exist, it has to come from somewhere, the engine looks at what's available and then extrapolates as best it can, essentially making stuff up. Blurring is the direct result of 13,912 additional pixels being generated and interpolated by the process. This might then lead the texture artist to think there's all manner of problems with the image; problem with the format being used, exacerbated when using a 'lossy' formats like JPEG; that there's a problem with the game engine and technology; when that fact it's neither and instead simply a matter of not knowing about proper texture proportions and the "Power of Two" rule. # Build size optimization - [Reducing the File Size of the Build](http://docs.unity3d.com/Manual/ReducingFilesize.html)