GUITexture disappears in build

Hey there,

I loaded a GUITexture on the scene and if i leave it there and i build the proyect, everything is fine, the GUITexture appears on the screen, but when i load a C# script to the GUITexture, and then i build the proyect, the Guitexture is gone… However the script works just fine before building the proyect, its an animation, the script replaces the GUITexture image for another one… here is the script:


    using UnityEngine;
    using System.Collections;
    
    public class fred : MonoBehaviour {
    	
    	string fred1 = "Assets/Materials/textures/fred.png";
    	string fred2 = "Assets/Materials/textures/fred2.png";
    	
    	// Use this for initialization
    	IEnumerator Start () {
    		int c=0;
    		
    		Texture fredim = Resources.LoadAssetAtPath(fred1,typeof(Texture)) as Texture;
    		Texture fredimm = Resources.LoadAssetAtPath(fred2,typeof(Texture)) as Texture;
    		
    		guiTexture.texture = fredimm;
    		
    		while(true){			
    			if(c==0){
    				guiTexture.texture = fredim;
    				c=1;
    				yield return new WaitForSeconds(0.5f);
    			} else {
    				guiTexture.texture = fredimm;
    				c=0;
    				yield return new WaitForSeconds(0.5f);
    			}
    			
    			yield return new WaitForSeconds(.05f);
    		}
    	}
    	

    	// Update is called once per frame
    	void Update () {
    	}
    }

LoadAssetAtPath works in the Editor only.
And move Materials folder under Assets/Resources/

using UnityEngine; 
using System.Collections;

public class fred : MonoBehaviour {

	string fred1 = "Materials/Textures/fred";
	string fred2 = "Materials/Textures/fred2";

	IEnumerator Start () {
		int c=0;

		Texture fredim = Resources.Load (fred1) as Texture;
		Texture fredimm = Resources.Load (fred2) as Texture;

		guiTexture = fredim;
		while(true){            
			if(c==0){
				guiTexture = fredim;
				c=1;
				yield return new WaitForSeconds(0.5f);
			} else {
				guiTexture = fredimm;
				c=0;
				yield return new WaitForSeconds(0.5f);
			}
			yield return new WaitForSeconds(.05f);
		}
	}
}