Why does my script-made mesh only look visible from one side???

Here is the script…

var newVertices : Vector3;
var newTriangles : int;

function Update () {
var mesh : Mesh = GetComponent(MeshFilter).mesh;

mesh.Clear();
// Do some calculations...
mesh.vertices = newVertices;
mesh.triangles = newTriangles;

}

I then make 4 vertices and 4 faces as a pyramid, but I can only see a single triangle.

Any help is very much appreciated.

Also, I already read the Unity Scripting Reference, and I didn’t see this mentioned.

All triangles are single-sided (by default). The order which the vertices are linked determines which direction they face. Try reversing the order on the not-visible ones. That said, there are some shaders that have backface culling turned off, or you can learn shader language enough to modify existing shaders to do that, and all triangle would be drawn two-sided.