Prefab loses its materials after running the game - Why?

In my Resources folder I have a prefab. That prefab has a few sub-meshes to which I want to apply a material/texture. So I assign a material by clicking the little black triangle next to "Element 0" in the Materials list & choosing a material. Then I save, and hit the play buttonplay button and test my game. Everything is fine. But when I return to the project view in Unity, my meshes no longer have a material. Element 0 says, "Missing (Material)". If I run the game again at this point, those objects have no materials or textures.

The result is I have to re-apply the materials every time I run the game. Can someone tell me what I have to do to make those materials permanent, so they don't get removed when I test the game?

Visual Aids:

Before: before

After: after

Note: I have a script that changes the texture on these meshes during the game. The code that changes the texture is:

myObject.renderer.material.mainTexture = www.texture;

where "www" is a `WWW` object.

However, I wouldn't expect that to affect the project files or settings. Am I missing something?

You should only change instances of prefabs, not prefabs themselves. I would generally recommend not using Resources.Load unless you really have to, because you're more likely to make mistakes like that. Typically you do something like this:

var go : GameObject;

function Start () {
    var instance = Instantiate(go);
    instance.renderer.material.mainTexture = whatever;
}