Navigation
API > API/Runtime > API/Runtime/CoreUObject
Description
Tries to find the first objects matching the search parameters in memory. This will handle fully qualified paths of the form /path/packagename.object:subobject and resolve references for you. This version of StaticFindFirstObject will not assert on UE::IsSavingPackage() or IsGarbageCollecting() If multiple objects share the same name the returned object is random and not based on its time of creation unless otherwise specified in Options (see EFindFirstObjectOptions::NativeFirst) This function is slow and should not be used in performance critical situations.
| Name | StaticFindFirstObjectSafe |
| Type | function |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectGlobals.h |
| Include Path | #include "UObject/UObjectGlobals.h" |
| Source | /Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectGlobals.cpp |
UObject * StaticFindFirstObjectSafe
(
UClass * Class,
FStringView Name,
EFindFirstObjectOptions Options,
ELogVerbosity::Type AmbiguousMessageVerbosity,
const TCHAR * InCurrentOperation
)
Returns a pointer to an object if found, null otherwise
Parameters
| Name | Remarks |
|---|---|
| Class | The to be found object's class |
| Name | The object path to search for an object, relative to InOuter |
| Options | Search options |
| AmbiguousMessageVerbosity | Verbosity with which to print a message if the search result is ambiguous |
| InCurrentOperation | Current operation to be logged with ambiguous search warning |