Title!
I was wondering the easiest way to check the kind of collider you get from OnTriggerEnter. It only returns a Collider2D, which all the collider classes inherit. I have different cases I need to happen for each kind of collider, box, sphere, and poly.
The way I’d do it right now is using GetComponent<(collider type I’m checking, eg BoxCollider2D)> and seeing if that is null.
Any better way to do this?