Hello guys, I have a character in my game and I have different PolygonCollider2D attached to them, in order to enable/disable them depending on which sprite animation is playing at the moment. That is because the idle animation is different than the running or jumping one, so as I can’t edit the vertices of the PollygonCollider, I just attached 3 of them with all of them having different shapes of course.
The thing is i don’t know how to identify these components in order to get them by script and enabling or desabling them. I can make:
PolygonCollider2D collider1 = gameObject.GetComponent<PolygonCollider2D> ();
But I don’t know which one would be cause there’s nothing there to identify them.
Thanks in advance.