I guess this is an editor mode problem.
Unity does not instantiate sub meshes in editor mode
So I had to “double buffer” to force initialization of the mesh then copy it over.
////////////TRIS
List<int> _tris = new List<int>();
for (int i = 0; i < mesh.triangles.Length; i++)
{
int t = mesh.triangles[i];
_tris.Add(t);
}
mesh.triangles = _tris.ToArray();