LoadObject

Load an object.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/UObjectGlobals.h"

Syntax

template<class T>
T * LoadObject
(
    UObject * Outer,
    const TCHAR * Name,
    const TCHAR * Filename,
    uint32 LoadFlags,
    UPackageMap * Sandbox
)

Remarks

Load an object.

Returns

The object that was loaded or found. nullptr for a failure.

Parameters

Parameter

Description

ObjectClass

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 (or find in the file's package object)

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

bAllowObjectReconciliation

Whether to allow the object to be found via FindObject in the case of seek free loading

InstancingContext

InstancingContext used to remap imports when loading a packager under a new name

See Also

StaticLoadObject()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.

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