I want to change texture using only script not inspector for many transitions.
I googling a lot but not work T.T
Texture myTexture;
myTexture = (Texture)Resources.Load("123.png");
if(myTexture == null)
{
Debug.Log("x");
}
renderer.material.mainTexture = myTexture;
I used this code but myTexture still null after load.
123.png is in assets folder.