That line happens because theres no UV seam, the last batch of triangles loops back from a high uv value to zero, duplicate the verts along the seam so you can have 2 uv coords in the same spot
@hpjohn I am facing that exact same problem and to avoid duplicating the question I will first try asking you here directly (also bumping this question in the process). Your conceptual explanation is good, however I am finding it difficult to implement a proper solution to that.
My current code is slightly different from the OP:
Vector3[] nVertices = mesh.vertices;
Vector2[] UVs = new Vector2[nVertices.Length];
for (var i = 0; i < nVertices.Length; i++)
{
var unitVector = nVertices[i].normalized;
Vector2 ISOuv = new Vector2(0, 0);
ISOuv.x = (Mathf.Atan2(unitVector.x, unitVector.z) + Mathf.PI) / Mathf.PI *0.5f;
ISOuv.y = (Mathf.Acos(unitVector.y) + Mathf.PI) / Mathf.PI - 1;
UVs[i] = new Vector2(ISOuv.x, ISOuv.y);
}
mesh.uv = UVs;
A cheat/simple solution which works for boulders , asteroids and similar objects is to make sure that the U (or V - whichever you have the problem with) coordinate starts at 0.0 , goes to 1.0 and then back to 0.0.
The opposite side of the rock will have the same texture but … no seam.
Still you will have polar problems and such.
Super cheaty version is to simply