Hi everyone,
I’m working on a 2D game using Instanced Static Mesh Components (ISM) for sprites. Each sprite is a plane mesh, and I’m using Texture2DArray to allow different sprites to share the same material and same HISM. This works well for performance, though im confused on how to use Load Async in this architecture.
The Problem
- All textures in the
Texture2DArray
are in the material already, even if they’re not used. For example, if a battle only uses arrows, textures for bolts and bullets are still loaded. - This wastes memory, especially as the number of textures grows.
Questions
- Can I load textures async with
Texture2DArray
, or is it incompatible since the array is pre-configured in the editor? - Should I split
Texture2DArray
into smaller groups (e.g., one for arrows, one for bolts) and load them as needed? - Are there better alternatives? or something im missing?
Illshow some screenshots below so to get a context, its a bit pseudo code: