Skip to content

Api > GameObject > GetComponentInChildren()


GameObject.GetComponentInChildren([]{Generic : Component|info} type)⚓︎

Returns the component of Type type in the GameObject or any of its children using depth first search.

Parameters:⚓︎

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

Returns:⚓︎

type Description
[]{Generic : Component info}

Usage⚓︎

---@type GameObject
local gameobject;

---@type TComponent
local type;


local val0 = gameobject.GetComponentInChildren(type)