Method FindSnapCollider
FindSnapCollider(GameObject)
This method is responsible for finding a valid Collider component available. available. The first valid collider found will be used as the snapCollider.
Declaration
protected static Collider FindSnapCollider(GameObject gameObject)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | gameObject | The GameObject to find the Collider component for. |
Returns
| Type | Description |
|---|---|
| Collider | The best snap collider candidate for the provided GameObject. |
Remarks
The snap collider must be a trigger collider, so the collider type can only be a BoxCollider, SphereCollider, CapsuleCollider, or convex MeshCollider.