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

My issue was:

“GetTriangleStrip” (not exists at all)

Replaced for “GetTriangles”

Works for me, thanks!

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!

Did you check out the documentation?

Appears there is no method for getting an individual triangle in the current API. How you fix it will depend on your use case.

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

change GetTriangleStrip to GetTriangles and SetTriangleStrip to SetTriangles…
and it works…!

Thanxxx…!

Vector3 staticVel = transform.TransformDirection(skidSmoke.localVelocity) + skidSmoke.worldVelocity;

here not reference localVelocity and worldVelocity

please help