private void CollectTilePolygons()
        {
            if (!m_Tile.m_CollisionObjects.IsEmpty())
            {
                foreach (var collision in m_Tile.m_CollisionObjects)
                {
                    var tilePoly = new TilePolygon();
                    tilePoly.IsClosed          = collision.IsClosed;
                    tilePoly.ColliderLayerName = collision.m_PhysicsLayer;
                    tilePoly.ColliderLayerId   = LayerMask.NameToLayer(collision.m_PhysicsLayer);
                    tilePoly.IsTrigger         = m_ImportContext.GetIsTriggerOverridable(collision.m_IsTrigger);

                    var points = m_ImportContext.MakePointsPPU(collision.Points);
                    points = points.Select(pt => (Vector2)m_Transform.MultiplyPoint(pt)).ToArray();

                    // Make sure the polygon points order is still CCW. Otherwise clipper may subtract polygons from each other.
                    if (PolygonUtils.SumOverEdges(points) < 0)
                    {
                        points = points.Reverse().ToArray();
                    }

                    tilePoly.Points = points;

                    m_Polygons.Add(tilePoly);
                }
            }
        }
        public static void AddCollider(this CollisionObject collision, SuperTile tile, GameObject goParent, SuperImportContext importContext)
        {
            var go = new GameObject(collision.m_ObjectName);

            if (collision.CollisionShapeType == CollisionShapeType.Polygon)
            {
                AddPolygonCollider(go, collision, tile, importContext);
            }
            else if (collision.CollisionShapeType == CollisionShapeType.Polyline)
            {
                AddEdgeCollider(go, collision, tile, importContext);
            }
            else if (collision.CollisionShapeType == CollisionShapeType.Ellipse)
            {
                AddEllipseCollider(go, collision, tile, importContext);
            }
            else if (collision.CollisionShapeType == CollisionShapeType.Rectangle)
            {
                AddBoxCollider(go, collision, tile, importContext);
            }

            // Additional settings on the collider that was just added
            var addedCollider = go.GetComponent <Collider2D>();

            if (addedCollider != null)
            {
                addedCollider.isTrigger = importContext.GetIsTriggerOverridable(collision.m_IsTrigger);
            }

            goParent.AddChildWithUniqueName(go);
        }