I'm quite new to Unity and currently have the issue that I can't add a texture to my procedurally generated plane:
function Start () {
//Create landscape
var plane : GameObject = GameObject.CreatePrimitive(PrimitiveType.Plane);
plane.transform.position = Vector3(0.0, 0.0, 0.0);
plane.renderer.material.mainTexture = Resources.Load("planeTex");
}
I created a graphic that is 1024x1024 and saved it as .jpg and than dragged this image into my "assets -> materials" folder in unity. At least this is what I gathered in other articles.
Considering the articles this should be a simple task but somehow the texture is not visible (the plane is white).
Any help is appreciated (maybe I'm missing a basic information about textures or something like this).
↧