- Home /
error CS1061: Type `UnityEngine.Mesh' does not contain a definition for `SetTriangle' and no extension method
Hello
When I upgraded to Unity 5 a few days ago I got these three errors from the Script MeshCombineUtility
Assets/Scripts/CSharpScripts/MeshCombineUtility.cs(27,66): error CS1061: Type UnityEngine.Mesh' does not contain a definition for
GetTriangle' and no extension method GetTriangle' of type
UnityEngine.Mesh' could be found (are you missing a using directive or an assembly reference?)
Assets/Scripts/CSharpScripts/MeshCombineUtility.cs(121,65): error CS1061: Type UnityEngine.Mesh' does not contain a definition for
GetTriangle' and no extension method GetTriangle' of type
UnityEngine.Mesh' could be found (are you missing a using directive or an assembly reference?)
Assets/Scripts/CSharpScripts/MeshCombineUtility.cs(167,22): error CS1061: Type UnityEngine.Mesh' does not contain a definition for
SetTriangle' and no extension method SetTriangle' of type
UnityEngine.Mesh' could be found (are you missing a using directive or an assembly reference?)
I read that if you changed it from 'SetTriangleStrip' to 'SetTriangle' and 'GetTriangleStrip' to 'GetTriangle' that it would fix the problem but so far that has just kept the same errors.
I've looked up other threads but I haven't been able to find a solution to fix the problem and I'm hesitant to mess around with the script too much in case I do something too drastic.
Thank You
Answer by Riagan · Apr 19, 2015 at 02:41 PM
I did what you suggested Dok101. But it looks like you had a spelling error, I think it should be, "SetTriangles" and "GetTriangles" (Plural, with the "s" at the end). At least that just worked for me...
If nothing else, thanks for the hint!
Answer by julioluchesi · Oct 06, 2015 at 02:47 PM
My issue was:
"GetTriangleStrip" (not exists at all)
Replaced for "GetTriangles"
Works for me, thanks!
Answer by Kiwasi · Mar 28, 2015 at 04:21 AM
Did you check out the documentation?
http://docs.unity3d.com/ScriptReference/Mesh.html
Appears there is no method for getting an individual triangle in the current API. How you fix it will depend on your use case.
Answer by Zubeid · Jan 01, 2017 at 08:29 AM
I had the same error and I did exactly what juliouchesi did. I changed the GetTriangleStrip to GetTriangles as well as change SetTriangleStrip to SetTriangles
Answer by Prashhh · Jan 17, 2017 at 11:02 AM
change GetTriangleStrip to GetTriangles and SetTriangleStrip to SetTriangles..... and it works....!
Thanxxx...!
Your answer
Follow this Question
Related Questions
Help "Too many threads" 0 Answers
Canvas Problem 1 Answer
Can't Establish connection using NetworkTransport 0 Answers
The name 'TrackManager' does not exist in the current context [Unity Vuforia Ground Plane Project] 0 Answers
BCE0018 asset package giving error, folder is in standard assets. 0 Answers