Navigation
API > API/Runtime > API/Runtime/CoreUObject
Description
Find or load an object by string name with optional outer and filename specifications. These are optional because the InName can contain all of the necessary information.
| Name | StaticLoadObject |
| 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 * StaticLoadObject
(
UClass * Class,
UObject * InOuter,
FStringView Name,
FStringView Filename,
uint32 LoadFlags,
UPackageMap * Sandbox,
bool bAllowObjectReconciliation,
const FLinkerInstancingContext * InstancingContext
)
The object that was loaded or found. nullptr for a failure.
Parameters
| Name | Remarks |
|---|---|
| Class | The class (or a superclass) of the object to be loaded. |
| InOuter | An optional object to narrow where to find/load the object from |
| Name | String name of the object. If it's not fully qualified, InOuter and/or Filename will be needed |
| Filename | An optional file to load from (Deprecated parameter) |
| LoadFlags | Flags controlling how to handle loading from disk, from the ELoadFlags enum |
| Sandbox | A list of packages to restrict the search for the object (Deprecated parameter) |
| bAllowObjectReconciliation | Whether to allow the object to be found via FindObject before forcing a load (Deprecated parameter) |
| InstancingContext | InstancingContext used to remap imports when loading a package under a new name |