I'm in the process of incorporating Tiled2Unity prefabs into my code. Their exporter creates a collision object (shown below) that amalgamates the collider of each tile into a single Polygon Collider 2D made up of multiple "subcollider" paths, shown below as green polygons.
What I'm trying to do is to adapt my old corner detection code to work with the new collider, but when OnTriggerStay2D(Collider2D other) is triggered, I'm not provided with the specific path I've collided with. In the picture, each green polygon is a path, and together they make up the Collider2D (other) provided in the argument.
Is there any way to find out which path I've collided with, without looping through each of the 1000ish points every time I want to detect a nearby corner? So far I am only able to discover via events that I've collided somewhere in the ENTIRE collection of green polygonal paths.
Thanks!