How can I output (debug.log for example) amount of tris a specific object has? For example when I attach the script to a game object, if it has a mesh file attached, count the triangles.
Thanks
How can I output (debug.log for example) amount of tris a specific object has? For example when I attach the script to a game object, if it has a mesh file attached, count the triangles.
Thanks
See this page: http://unity3d.com/support/documentation/ScriptReference/Mesh.html
you'll want mesh.triangles.Length
If your object has multiple meshes, use GetComponentsInChildren(MeshFilter) to find them all and add them up.