GetComponents
7/14/25Less than 1 minute
AudioSource.GetComponents(TComponent type)
Returns all components of Type type in the GameObject.
Parameters:
| Name | Type | Description |
|---|---|---|
| type | TComponent | The type of Component to retrieve. |
Returns:
| type | Description |
|---|---|
| TComponent[] | all components of Type type in the GameObject. |
Usage
---@type AudioSource
local audiosource;
---@type TComponent
local type;
local val0 = audiosource.GetComponents(type)
