BayazitDecomposer inaccessible when upgrading from Farseer 3.3.1 to Farseer 3.5

I used the following code in Farseer 3.3.1 and it worked correctly, but in Farseer 3.5, I always get an error message in the following line:

list = BayazitDecomposer.ConvexPartition(textureVertices);
'FarseerPhysics.Common.Decomposition.BayazitDecomposer' is inaccessible due to its protection level

What is wrong? Why is the code not working with Farseer 3.5? How can I use the decomposition tools in Farseer 3.5?

Jon Skeet
people
quotationmark

Well, it's simply that the author of the package has changed the class from public to internal. As far as I can see, that happened in commit 101636.

This is a breaking change, so should not have been done in a minor version IMO - but perhaps the author isn't following semantic versioning. You should probably file a feature request for it to be made public again.

Alternatively, you could try to find an alternative approach you can use to achieve the same thing. I suspect this is what you want:

list = Triangulate.ConvexPartition(textureVertices, TriangulationAlgorithm.Bayazit);

people

See more on this question at Stackoverflow