Skip to content

Api > PlayableDirector > GetComponent()


PlayableDirector.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 PlayableDirector
local playabledirector;

---@type TComponent
local type;


local val0 = playabledirector.GetComponent(type)

Example⚓︎

local transform = myComponent.GetComponent(Transform);