NavMeshAgent.FindObjectOfType(userdata type)
Returns the first active loaded object of Type type.
Parameters:
Name | Type | Description |
---|---|---|
type | userdata | The type of object to find. |
Returns:
type | Description |
---|---|
Object | first active loaded object of Type. |
Usage
---@type userdata
local type;
local val0 = NavMeshAgent:FindObjectOfType(type)
Example
To find first object of type transform
local transform = Object.FindObjectOfType(Transform);