Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

FindObjects

Finds the first specified number of objects by class name or short object name.

To find all objects that match your criteria, set param 1 to 0 or nil.

Parameters

#TypeInformation
1integerThe number of objects to find
1string|FName|nilThe short name of the class of the object
2string|FName|nilThe short name of the object itself
3EObjectFlagsAny flags that the object cannot have. Uses | as a seperator
4EObjectFlagsAny flags that the object must have. Uses | as a seperator
6boolWhether to require an exact match with the UClass parameter

Return Value

#TypeSub TypeInformation
1tableUObjectThe derivative of the UObject

Example

local Object = FindObjects(4, "SceneComponent", "TransformComponent0", EObjectFlags.RF_NoFlags, EObjectFlags.RF_ClassDefaultObject, true)

for _, Object in pairs(Objects) do
    -- Do something with Object
end