Skip to content

Api > BoxCollider > GetComponent()


BoxCollider.GetComponent([]{Generic : Component|info} type)⚓︎

Returns the component of Type type if the game object has one attached, nil if it doesn't.

Parameters:⚓︎

Name Type Description
type []{Generic : Component info}

Returns:⚓︎

type Description
[]{Generic : Component info}

Usage⚓︎

---@type BoxCollider
local boxcollider;

---@type TComponent
local type;


local val0 = boxcollider.GetComponent(type)

Example⚓︎

local transform = myComponent.GetComponent(Transform);