- Home /
What happens when on mobile loading "too-large" textures?
I have no way of testing this since both my Android devices do support a maximum texture size of 4096x4096.. but how exactly does a Unity app deal with textures too large for the device?
Basically I wonder if the engine downsizes textures at runtime automatically if they exceed device capabilities, or if this is something I'd need to take care of myself.
Note I'm only targeting GL ES 2.x or higher right now. If I take a lot longer with my project, I'll probably even only target GL ES 3.x or higher..
This is a great question. I've never known the answer. On iOS it seems to "just work, somehow" albeit slowly. I've spent dozens of hours trying to work out WTF exactly is the situation, and I've never found an answer.
"Basically I wonder if the engine downsizes textures at runtime automatically if they exceed device capabilities"
I$$anonymous$$O SO$$anonymous$$ETHING, either unity or ios, does seem to handle it. "amazingly but confusingly" - let's say - you just don't seem to need to worry.
notes ..
(1) if you're talking about 2D, you're almost certainly using 2DToolkit. As you know a major paradigm of T$$anonymous$$ is that it allows you to have, indeed makes automatically, totally different sprite sheets for the various device generations, and automatically uses the correct one for you. obviously this is a major aspect, central aspect, of using unity for 2d games
(2) don't forget the annoying "quality settings" in unity, look in to them too
$$anonymous$$aybe you could use Android emulator to test this? I think emulator supports up to 1024x1024.