C# Resources.Load() problem

I try to load image by script.

But I don't load image.

Is there any way to load a texture from a string reference?


public class LearningScript : MonoBehaviour


  private Texture testTexure; 
  void Start() 

       Object temp = Resources.Load("iPhone Standard Assets/Textures/sky_02"); 

       if (  temp == null ) 
          Debug.Log("Load Object Fail"); 

       testTexure = Resources.Load("iPhone Standard Assets/Textures/sky_02" ) as Texture; 

       if ( testTexure == null ) 
         Debug.Log("Load Texture Fail"); 



alt text


alt text

You can only load textures, models etc, by using Resources.Load if they are placed under a folder named "Resources" (see the scripting reference for more info). So if you move your sky_02 texture to a folder named "Resources" and change the "iPhone Standard Assets/Textures/sky_02" string to simply "sky_02" it should work.