StaticFindObjectFastSafe

Fast and safe version of StaticFindObject that relies on the passed in [FName](API\Runtime\Core\UObject\FName) being the object name without any group/package qualifiers.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectGlobals.h

Include

#include "UObject/UObjectGlobals.h"

Source

/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectGlobals.cpp

Syntax

UObject * StaticFindObjectFastSafe
(
    UClass * Class,
    UObject * InOuter,
    FName InName,
    bool ExactClass,
    bool AnyPackage,
    EObjectFlags ExclusiveFlags,
    EInternalObjectFlags ExclusiveInternalFlags
)

Remarks

Fast and safe version of StaticFindObject that relies on the passed in FName being the object name without any group/package qualifiers. It will not assert on GIsSavingPackage or IsGarbageCollecting(). If called from within package saving code or GC, will return nullptr This will only find top level packages or subobjects nested directly within a passed in outer.

Returns

Returns a pointer to the found object or null if none could be found

Parameters

Parameter

Description

Class

The to be found object's class

InOuter

Outer object to look inside, if null this will only look for top level packages

InName

Object name to look for relative to InOuter

ExactClass

Whether to require an exact match with the passed in class

AnyPackage

Whether to look in any package

ExclusiveFlags

Ignores objects that contain any of the specified exclusive flags

ExclusiveInternalFlags

Ignores objects that contain any of the specified internal exclusive flags

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss