- Home /
Dynamically loading textures to avoid memory problems
I've come across a unique problem where I have a template for a level but the level needs to be textured depending on various input. There are thousands of possible combinations in terms of the possible texture inputs. I was wondering if there was a way to possibly specify which textures were to be used before the level was loaded so I could avoid loading all of the possible textures and consuming a massive amount of memory.
Any help would be appreciated.
Answer by testure · Jun 29, 2011 at 05:55 AM
Unity will only load textures for objects that are using them in the scene graph. So if you don't have textures or materials applied to an object in the scene, it is not loaded. Simple as that. If you were looking to do some sort of dynamic streaming of textures, you could make sure that there were no texture references on the materials at runtime and load them on an as-needed basis.
Your answer
Follow this Question
Related Questions
Load image into texture not working on Galaxy SIII 1 Answer
Loading user custom image. 2 Answers
Assigning UV Map to model at runtime 0 Answers