StaticFindObject

The StaticFindObject function is used to find any object that inherits from UObject that currently exists in memory.

This function is the recommended way of retrieving non-instance objects such as objects of type UClass or UFunction.

Parameters (overload #1)

#TypeInformation
1stringFull name of the object to find, without the type prefix

Parameters (overload #2)

The parameters for this overload mimics the StaticFindObject function from UE4.
For more information see: Unreal Engine API -> StaticFindObject

#TypeInformation
1UClassThe class of the object to find, can be nil.
2UObjectThe outer to look inside. All packages are searched if nil.
3stringName of the object to find
4boolWhether to require an exact match with the UClass parameter

Return Value (overload #1 & #2)

#TypeInformation
1UObject, UClass, or AActorObject is only valid if an instance was found

Example (overload #1)

local CharacterInstance = StaticFindObject("/Script/Engine.Character")
if not CharacterInstance:IsValid() then
    print("No instance of class 'Character' was found.")
end