unityで法線マップが正常に表示されない

```lang:filename
public class test3 : MonoBehaviour
{
	List<Vector3> newVertices = new List<Vector3> ();
	List<int> newTriangles = new List<int> ();
	List<Vector2> newUV = new List<Vector2> ();

	void Start ()
	{
		Mesh mesh = this.GetComponent<MeshFilter> ().mesh;		
		
		CubeTop ();
		CubeBot ();
		CubeEast ();
		CubeWest ();
		CubeNorth ();
		CubeSouth ();
		
		mesh.Clear ();		
		mesh.vertices = newVertices.ToArray ();
		mesh.triangles = newTriangles.ToArray ();
		mesh.uv = newUV.ToArray ();
		mesh.uv2 = newUV.ToArray ();
		mesh.Optimize ();
		mesh.RecalculateNormals ();
	}
        
	//頂点の作成は各軸の正方向から見て左上,右上,右下,左下の順で６面全て統一して代わりに三角ポリゴンの順番を面ごとに定義している.
	//他のスクリプトで頂点を利用するときにやりやすいため.
	//y+.
	void CubeTop ()
	{
		newVertices.Add (new Vector3 (- 0.5f, 0.5f, 0.5f));
		newVertices.Add (new Vector3 (0.5f, 0.5f, 0.5f));
		newVertices.Add (new Vector3 (0.5f, 0.5f, - 0.5f));
		newVertices.Add (new Vector3 (- 0.5f, 0.5f, - 0.5f));

		Cube (0);
	}

	//y-.
	void CubeBot ()
	{		
		newVertices.Add (new Vector3 (- 0.5f, - 0.5f, 0.5f));
		newVertices.Add (new Vector3 (0.5f, - 0.5f, 0.5f));
		newVertices.Add (new Vector3 (0.5f, - 0.5f, - 0.5f));
		newVertices.Add (new Vector3 (- 0.5f, - 0.5f, - 0.5f));

		Cube (1);
	}

	//x+.
	void CubeEast ()
	{
		newVertices.Add (new Vector3 (0.5f, 0.5f, - 0.5f));
		newVertices.Add (new Vector3 (0.5f, 0.5f, 0.5f));
		newVertices.Add (new Vector3 (0.5f, - 0.5f, 0.5f));
		newVertices.Add (new Vector3 (0.5f, - 0.5f, - 0.5f));

		Cube (2);
	}

	//x-.
	void CubeWest ()
	{
		newVertices.Add (new Vector3 (- 0.5f, 0.5f, - 0.5f));
		newVertices.Add (new Vector3 (- 0.5f, 0.5f, 0.5f));
		newVertices.Add (new Vector3 (- 0.5f, - 0.5f, 0.5f));
		newVertices.Add (new Vector3 (- 0.5f, - 0.5f, - 0.5f));

		Cube (3);
	}

	//z+.
	void CubeNorth ()
	{
		newVertices.Add (new Vector3 (- 0.5f, 0.5f, 0.5f));
		newVertices.Add (new Vector3 (0.5f, 0.5f, 0.5f));
		newVertices.Add (new Vector3 (0.5f, - 0.5f, 0.5f));		
		newVertices.Add (new Vector3 (- 0.5f, - 0.5f, 0.5f));

		Cube (4);
	}

	//z-.
	void CubeSouth ()
	{
		newVertices.Add (new Vector3 (- 0.5f, 0.5f, - 0.5f));
		newVertices.Add (new Vector3 (0.5f, 0.5f, - 0.5f));
		newVertices.Add (new Vector3 (0.5f, - 0.5f, - 0.5f));
		newVertices.Add (new Vector3 (- 0.5f, - 0.5f, - 0.5f));

		Cube (5);
	}

	void Cube (int meshKind)
	{
		int faceCount = newVertices.Count / 4 - 1;
		
		//top,east,south.
		if (meshKind == 0 | meshKind == 2 | meshKind == 5) {
			newTriangles.Add (faceCount * 4 + 0);
			newTriangles.Add (faceCount * 4 + 1);
			newTriangles.Add (faceCount * 4 + 2);
			newTriangles.Add (faceCount * 4 + 0);
			newTriangles.Add (faceCount * 4 + 2);
			newTriangles.Add (faceCount * 4 + 3);
		}
		//bot,west,north.
		if (meshKind == 1 | meshKind == 3 | meshKind == 4) {
			newTriangles.Add (faceCount * 4 + 1);
			newTriangles.Add (faceCount * 4 + 0);
			newTriangles.Add (faceCount * 4 + 3);
			newTriangles.Add (faceCount * 4 + 1);
			newTriangles.Add (faceCount * 4 + 3);
			newTriangles.Add (faceCount * 4 + 2);
		}

		newUV.Add (new Vector2 (0, 1));
		newUV.Add (new Vector2 (1, 1));
		newUV.Add (new Vector2 (1, 0));
		newUV.Add (new Vector2 (0, 0));
	}
}
```
法線マップだけ正常に表示されない
![jhrshts.JPG](https://qiita-image-store.s3.amazonaws.com/0/56292/662a5f86-c51b-a01b-6f51-8e2d6d77b24f.jpeg)

マテリアル
法線マップ＝「上」という文字
![gfr3wqg.JPG](https://qiita-image-store.s3.amazonaws.com/0/56292/1a62f607-a007-7ae2-bf9d-58df75e2600d.jpeg)

解決したので追記します

法線マップを正常に表示するにはtangentをメッシュに合わせる必要があるみたいで
自作する際にはMesh.Optimize()やMesh.RecalculateNormals()を書くと思いますが
これらはmesh.tangentsをメッシュに合わせて更新してくれないので自分で計算する必要があるみたいです
以下はtangent計算の参考URLです
http://blog.livedoor.jp/akinow/archives/52387194.html