Api > GameObject > GetComponent()
GameObject.GetComponent([]{Generic : Component|info} type)⚓︎
Returns the component of Type type if the game object has one attached, null if it doesn't.
Parameters:⚓︎
Name | Type | Description |
---|---|---|
type | [ |
info} |
Returns:⚓︎
type | Description |
---|---|
[ |
info} |
Usage⚓︎
---@type GameObject
local gameobject;
---@type TComponent
local type;
local val0 = gameobject.GetComponent(type)