Answers for "Looking for triangles attached to a vertice"
http://answers.unity.com/questions/1402839/looking-for-triangles-attached-to-a-vertice.html
The latest answers for the question "Looking for triangles attached to a vertice"Answer by Glurth
http://answers.unity.com/answers/1403043/view.html
If this **actually** causes you performance problems, you can always use the solution of " use more memory".
-At startup: build an array the same size as your mesh vertex array.
-Each element of this array stores a set/list of triangles the vertex belongs to.
-Once built, you can simply index to this array (using the vertex index) to get the list of triangles the vertex belongs to, without any need to loop.Tue, 05 Sep 2017 18:37:34 GMTGlurthAnswer by Bunny83
http://answers.unity.com/answers/1402852/view.html
In general you want to cache the various arrays that the mesh object provides in a local variable when you need to access them more than once.
// C#
var verts = mesh.vertices;
var triangles = mesh.triangles;
for(int I = 0; I < triangles.length; I++)
{
if (vertex == verts[triangles[i]])
// ...
}Tue, 05 Sep 2017 11:04:51 GMTBunny83