Method TryAddTriggerBoxCollider
TryAddTriggerBoxCollider(GameObject, float)
If no collider is on the game object, add a box collider of given size, in Trigger mode
Declaration
public static bool TryAddTriggerBoxCollider(GameObject gameObject, float size = 0.01)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | Game object to add the collider to |
float | size | Size of the cube |
Returns
Type | Description |
---|---|
bool | true if the collider was added |