I have a Texture2D from a png that has a large rounded-corner rectangle in the middle of transparent background. I'm getting an exception when I try to turn this into a list of Vertices using PolygonTools.CreatePolygon. It is a null reference exception at
the second if statement in:
if (_multipartDetection || polygon.Count <= 2)
if (SearchNextHullEntrance(detectedPolygons, polygonEntrance.Value, out polygonEntrance))
searchOn = true;
In TextureConverter.cs. It is polygonEntrance that is null.
After looking over the code it looks like this will always result in a null reference if the condition "polygon.Count <= 2" is met because polygonEntrance does not actually get instantiated until polygon.Count is greater than 2.