- Home /
Best way to handle loading textures based on device?
I am working on an iOs app that will be extended to Android. I'm using NGUI to create a resolution independent interface. At runtime, I load the appropriate textures for that device from the Resources folder. For example:
Resources/iPad Retina/logo_texture_ipad_retina.png
Resources/iPad/logo_texture_ipad.png
Resources/iPhone 5/logo_texture_iphone5.png
Resources/iPhone 4/logo_texture_iphone4.png
This all works but with so many textures in the Resources folder, my app is HUGE. I'm wondering what the best practice is to keep app size down and only build textures that are necessary for a device. For example, if the user is on an iPad 3, the only folder that needs to exist is Resources/iPad Retina/. The other folders are not used. Is this what Asset Bundles are for? Create an Asset Bundle for each device? I'd prefer the user doesn't have to download all the textures when the app runs. If downloading an Asset Bundle is the way to go, does caching make it a one-time thing? Is this a common practice?
Thanks
Yes, use asset bundles. Have some default textures in your game so the user doesn't have to wait for the asset bundles to download before playing the game.
Your answer
Follow this Question
Related Questions
Mobile keyboard questions 0 Answers
Render HTML Content in Unity UI Mobile Platforms 0 Answers
iOs weird textures (good on android) the reason? How to fix ? 1 Answer
Please help with scroll 0 Answers