Skip to main content

ColliderExtension

A static class in Root.Township, the global namespace.

Extension methods for finding a component on a collider or its attached rigidbody.

Methods​

MemberWhat it is
static T GetBodyComponent<T>(Collider collider)Gets the component from the attached rigidbody, or from the collider if it has none.
static T GetComponentIncludingBody<T>(Collider collider)Gets the component from the collider, then from the attached rigidbody if not found.