Hey !
I'm having performance issues on my iOS game and one of the questions I have to solve it is this :
I have some script that have public variables
public Texture tex;
Where I drop a texture in the Inspector view (texture are stored in the Assets/ folder)
When I press play I have a script that decide which texture to assign to the object material based on what's happening in the game.
I was wondering if Unity load all the textures in the public variables when the game starts or just load the texture when they are applied on a Material at runtime.
renderer.sharedMaterial.mainTexture = tex;
If someone has an idea or a related article that I can read ?
Many thanks.
↧