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?
code
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");
}
}
resource
result
Cyclops: and upvoting requires 15 rep, which Exotic doesn't have yet.
– Jourdan