Search Issue Tracker
Fixed in 5.2.0
Votes
0
Found in
5.1.0f3
Issue ID
704186
Regression
Yes
[Mesh] "Failed getting triangles. Submesh topology is lines or points" error when .triangles called on empty mesh
1. Mesh mesh = new Mesh();
2. Debug.Log(mesh.triangles);
3. Get the error! (which doesn't cause anything bad, but is annoying)
Seems to be regression starting with 5.1
Comments (5)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
mikelortega
Jul 16, 2015 06:53
@psyco92 @critic The problem is that if you need to access the mesh's triangles just checking mesh.vertexCount is not an option. Mesh.GetTriangles(int submesh) also shows the error message.
Psyco92
Jul 14, 2015 19:47
Thank you critic! mesh.vertexCount check before the mesh.triangles call worked :)
mikelortega
Jul 10, 2015 13:01
Unity 5.1.1p4 still has this problem. In what version will it be solved?
Does anyone have a workaround? At the moment I have to stay in 5.0
Thank you.
critic
Jul 06, 2015 17:29
Have the same problem (5.1.1f1), you can check Mesh.vertexCount to see if the triangle array is empty.
kami_sakura
Jun 25, 2015 14:37
same problem here need help !!