// in the Start() method Material yourMaterial = Resources.Load("red", typeof(Material)) as Material;