asset reference and memory

If a game object is referencing an asset, when does this asset start using memory? As soon as the level loads, or only “when I need it” (eg when I actually access said reference in a script) ?

For example, in my game the characters have “alternate” skins (like in Street Fighter where Ryu is white but if you play Ryu vs Ryu, Ryu 2 will be red or something).
So I have 2 textures, both referenced by a “skin switch” script that applies the correct texture to the renderer’s material… so will Unity load both textures when the character is instantiated? To put it another way, will both textures use memory, or only the one used by the renderer?

In case they do, how do I go around it? I know I could use Resources.Load but I hate it because then I have to use asset names (strings… yuk!), and I lose the benefit of the inspector.

Now, what about prefabs? Eg if a prefab references an asset, and a GO references this prefab, I assume the asset will not use memory as long as it’s not instantiated…?

I apologize if I’m not being very clear, I may not even be asking the right questions… I really need to get a clear picture of all this.
This has actually been bothering me for a while but I’m never found clear-cut answers in the documentation, so if anyone has good resources on the subject, I’m all ears!

I have the same set of questions. I’ll be developing a huge terrain where a big number of textures(aerial images) will cover it.

I’d like to know how can I keep performance acceptable. what should I do? should I free the textures not being displayed by the cam from memory?

Interesting question. I don’t have an answer but I think you should be able to load up a GO with your tex vars and check the stats (i.e. stats with one tex assigned, stats with two, stats with second one removed after game starts, etc.) to see if the mem usage changes.

That’s an interesting idea, thanks for the tip. I’ll have to make a special test project with really big textures so that if a change does occur, I am sure to detect it.

But either way, that’s just the kind of fiddling I’d like to avoid in the future… if only I could find some literature so that I really know the ins and out… hello Joachim, Aras and the rest of the big guns, you out there??