How to combine tow tiangles to one quad with one texture?

Hey guys!

I have create two triangles in a mesh.

scene and game result:

material:

606-material.jpg

the problem is the “unity logo” show incorrect in the quad, how can I do it ?

my email: kenshako@gmail.com

thank you!

here is my code:


var mat : Material;

var mesh : Mesh;

function Start() {

gameObject.AddComponent("MeshFilter");

gameObject.AddComponent("MeshRenderer");

}

function Update () {

mesh = GetComponent(MeshFilter).mesh;

mesh.Clear();

mesh.vertices = [
	//Triangle 1
	Vector3(0, 0, 0), 
	Vector3(0, 5, 0), 
	Vector3(5, 0, 0), 
	//Triangle 2
	Vector3(5, 0, 0), 
	Vector3(0, 5, 0), 
	Vector3(5, 5, 0)
];
	
mesh.uv = [
	//UV 1
	Vector2(0, 0), 
	Vector2(0, 1), 
	Vector2(1, 1), 
	//UV 2
	Vector2(0, 0), 
	Vector2(0, 1), 
	Vector2(1, 1)
];

mesh.triangles = [0,1,2,3,4,5];

mesh.normals = [
	//Normal 1
	Vector3(1,1,1),  
	Vector3(1,1,1), 
	Vector3(1,1,1), 
	//Normal 2
	Vector3(1,1,1), 
	Vector3(1,1,1), 
	Vector3(1,1,1)
];

renderer.material = mat;

}

Yeah your UV’s are off. Try this:

//UV 1
Vector2(0, 0), 
Vector2(0, 1), 
Vector2(1, 0), 
//UV 2
Vector2(1, 0), 
Vector2(0, 1), 
Vector2(1, 1)

thank you so much!,thank you!