function Start () {
var cube : GameObject = GameObject.CreatePrimitive(PrimitiveType.Cube);
renderer.material.mainTexture = Resources.Load(“grass.jpg”);
}
This is my code at the moment. I dragged grass.jpg from my desktop onto the “assets” area. This section of code is put onto a “Capsule”. There is no debug errors. I have found multiple questions with similar answers to this and got no use out of them. Is there something wrong with my code, or is there not enough code to do this?
Or, quite simply, is the Texture in the wrong place?
Thanks,
Zed.