Skip to main content

PlayableDirector.FindObjectOfType(userdata type)

Returns the first active loaded object of Type type.

Parameters:

NameTypeDescription
typeuserdataThe type of object to find.

Returns:

typeDescription
Objectfirst active loaded object of Type.

Usage

---@type userdata
local type;


local val0 = PlayableDirector:FindObjectOfType(type)

Example

To find first object of type transform

local transform = Object.FindObjectOfType(Transform);