Collider.GetComponentsInParent(TComponent t)
Returns all components of Type type in the GameObject or any of its parents.
Parameters:
Name | Type | Description |
---|---|---|
t | TComponent | The type of Component to retrieve. |
Returns:
type | Description |
---|---|
TComponent[] | all components of Type type in the GameObject or any of its parents. |
Usage
---@type Collider
local collider;
---@type TComponent
local t;
local val0 = collider.GetComponentsInParent(t)