I couldn't find any example of creating a polygon in Unity, I hope you can help me.
Hello,
There are code snippets that show how to create a polygon for the ArcGIS Maps SDK for Unity available on the developers guide pages (see below). Hopefully this will help!
https://developers.arcgis.com/unity/spatial-and-data-analysis/geometry/#polygon
Hi,
Code snippets that show how to create a polygon for the ArcGIS Maps SDK for Unity are completely wrong. This code works for creating a polygon.
ArcGISPolygonBuilder pb = new ArcGISPolygonBuilder(ArcGISSpatialReference.WGS84());
pb.AddPoint(x1, y1);
pb.AddPoint(x2, y2);
pb.AddPoint(x3, y3);
pb.AddPoint(x4, y4);
ArcGISPolygon polgon= (ArcGISPolygon)pb.ToGeometry();