Language:
Discover
By Skill Level
By Category

UObjectLibrary

Choose your OS:

Inheritance Hierarchy

Syntax

class UObjectLibrary : public UObject

Remarks

Class that holds a library of Objects

Variables

Name Description

Protected variable

TArray < FAssetD ...

 

AssetDataList

Asset data of objects that will belong in library, possibly not loaded yet

Public variable

bool

 

bHasBlueprintClasses

True if this library holds blueprint classes, false if it holds other objects

Public variable

bool

 

bIncludeOnlyOnDiskAssets

Whether to set bIncludeOnlyOnDiskAssets when setting up AR filters for discovering asset data

Protected variable

bool

 

bIsFullyLoaded

True if we've already fully loaded this library, can't do it twice

Public variable

bool

 

bIsGlobalAsyncScanEnvironment

True if we are running a build that is already scanning assets globally so we can perhaps avoid scanning paths synchronously

Public variable

bool

 

bRecursivePaths

Whether to set bRecursivePaths when setting up AR filters for discovering asset data

Protected variable

bool

 

bUseWeakReferences

If this library should use weak pointers

Public variable

TArray < FString ...

 

DeferredAssetDataPaths

The paths that we will query again once assets are finished being discovered

Public variable

UClass *

 

ObjectBaseClass

Class that Objects must be of.

Protected variable

TArray < UObject ...

 

Objects

List of Objects in library

Protected variable

FObjectLibraryO ...

 

OnObjectAddedEvent

WITH_EDITOR.

Protected variable

FObjectLibraryO ...

 

OnObjectRemovedEvent

Protected variable

TArray < TWeakOb ...

 

WeakObjects

Weak pointers to objects

Constructors

Name Description

Public function

UObjectLibrary

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function Virtual

bool

 

AddObject

(
    UObject * NewObject
)

Attempt to add a new Object, return true if added

Public function Virtual

void

 

ClearLoaded()

Clears the current loaded objects and asset data

Public function Static

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) c...

 

CreateLibrary

(
    UClass * InBaseClass,
    bool bInHasBlueprintClasses,
    bool bInUseWeak
)

WITH_EDITOR.

Public function

int32

 

GetAssetDataCount()

Returns the number of objects

Public function Virtual

void

 

GetAssetDataList

(
    TArray < FAssetData >& OutAssetData
)

Returns the list of asset data

Public function

int32

 

GetObjectCount()

Returns the number of objects

Public function

void

 

GetObjects

(
    TArray < T* >& OutObjects
)

Fills in a passed in array of objects, casts to proper type

Public function

bool

 

IsLibraryFullyLoaded()

Public function Virtual

int32

 

LoadAssetDataFromPath

(
    const FString & Path
)

Public function Virtual

int32

 

LoadAssetDataFromPaths

(
    const TArray < FString >& Paths,
    bool bForceSynchronousScan
)

Gets asset data for assets in a subdirectory. Returns number of assets data loaded

Public function Virtual

int32

 

LoadAssetsFromAssetData()

Load all of the objects in asset data list into memory

Public function Virtual

int32

 

LoadAssetsFromPath

(
    const FString & Path
)

Public function Virtual

int32

 

LoadAssetsFromPaths

(
    const TArray < FString >& Paths
)

Load an entire subdirectory of assets into this object library. Returns number of assets loaded

Public function Virtual

int32

 

LoadBlueprintAssetDataFromPath

(
    const FString & Path
)

Public function Virtual

int32

 

LoadBlueprintAssetDataFromPaths

(
    const TArray < FString >& Paths,
    bool bForceSynchronousScan
)

Load an entire subdirectory of blueprints into this object library.

Public function Virtual

int32

 

LoadBlueprintsFromPath

(
    const FString & Path
)

Public function Virtual

int32

 

LoadBlueprintsFromPaths

(
    const TArray < FString >& Paths
)

Load an entire subdirectory of blueprints into this object library.

Public function Virtual

void

 

OnAssetRegistryFilesLoaded()

Handler for when assets have finished scanning in the asset registry

Public function

FObjectLibra ...

 

OnObjectAdded()

Public function

FObjectLibra ...

 

OnObjectRemoved()

Public function Virtual

bool

 

RemoveObject

(
    UObject * ObjectToRemove
)

Attempt to remove an Object from the object, return true if removed

Public function Virtual

void

 

UseWeakReferences

(
    bool bSetUseWeak
)

Set rather this library is using weak or strong references

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object, and immediately after any undo/redo.

Classes

References

Module

Engine

Header

Runtime/Engine/Classes/Engine/ObjectLibrary.h