Skip to content

ColliderGizmos.cs throws ArgumentOutOfRangeException when selecting map layer with only Edge Colliders (PolyLines) #304

@Enfyve

Description

@Enfyve

Unity 6.3 LTS
Tiled 1.11.2
ST2U 2.4.0

Hey there,
When selecting an imported tilemap or its parents in the scene hierarchy, if there is an imported layer that does not contain closed collision geometry (ex: a layer only for one-way platforms utilizing EdgeCollider2D) then Unity raises an ArgumentOutOfRangeException when trying to call GetPath from ColliderGizmos.cs at ln 72.

Image Image

It appears that when ST2U's Collision Geometry Type is configured to import as Polygons, this attaches a PolygonCollider2D to every layer and fails to visualize in situations where there are no closeable polygons.

This issue does not occur if a layer contains mixed collisions with closed shapes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions