Click or drag to resize

CollidersGetActiveColliderT Method

Returns the first active collider of the requested type.
Use this method in conjunction with SafeDestroy(Collider) to properly handle colliders operations within one frame.

Namespace:  KSPDev.ModelUtils
Assembly:  KSPDev_Utils.2.5 (in KSPDev_Utils.2.5.dll) Version: 2.5 for KSP v1
Syntax
C#
public static T GetActiveCollider<T>(
	GameObject obj
)
where T : Collider
Request Example View Source

Parameters

obj
Type: UnityEngineGameObject
The object to get a collider from.

Type Parameters

T
The type of the collider to request.

Return Value

Type: T
The collider or null if no active colliders of that type were found.
See Also