Navigation
API > API/Runtime > API/Runtime/Engine
Class that holds a library of Objects
| Name | UObjectLibrary |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/ObjectLibrary.h |
| Include Path | #include "Engine/ObjectLibrary.h" |
Syntax
UCLASS (MinimalAPI)
class UObjectLibrary : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UObjectLibrary
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UObjectLibrary
(
const FObjectInitializer& ObjectInitializer |
Engine/ObjectLibrary.h |
Classes
| Name | Remarks |
|---|---|
| FObjectLibraryOnObjectAdded | |
| FObjectLibraryOnObjectRemoved |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bHasBlueprintClasses | bool | True if this library holds blueprint classes, false if it holds other objects | Engine/ObjectLibrary.h |
|
| bIncludeOnlyOnDiskAssets | bool | Whether to set bIncludeOnlyOnDiskAssets when setting up AR filters for discovering asset data | Engine/ObjectLibrary.h | |
| bIsGlobalAsyncScanEnvironment | bool | True if we are running a build that is already scanning assets globally so we can perhaps avoid scanning paths synchronously | Engine/ObjectLibrary.h | |
| bRecursivePaths | bool | Whether to set bRecursivePaths when setting up AR filters for discovering asset data | Engine/ObjectLibrary.h | |
| DeferredAssetDataPaths | TArray< FString > | The paths that we will query again once assets are finished being discovered | Engine/ObjectLibrary.h | |
| ObjectBaseClass | TObjectPtr< UClass > | Class that Objects must be of. | Engine/ObjectLibrary.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool AddObject
(
UObject* NewObject |
Attempt to add a new Object, return true if added | Engine/ObjectLibrary.h | |
virtual void ClearLoaded() |
Clears the current loaded objects and asset data | Engine/ObjectLibrary.h | |
int32 GetAssetDataCount() |
Returns the number of objects | Engine/ObjectLibrary.h | |
virtual void GetAssetDataList
(
TArray< FAssetData >& OutAssetData |
Returns the list of asset data | Engine/ObjectLibrary.h | |
int32 GetObjectCount() |
Returns the number of objects | Engine/ObjectLibrary.h | |
void GetObjects
(
TArray< T* >& OutObjects |
Fills in a passed in array of objects, casts to proper type | Engine/ObjectLibrary.h | |
bool IsLibraryFullyLoaded() |
Engine/ObjectLibrary.h | ||
virtual int32 LoadAssetDataFromPath
(
const FString& Path |
Engine/ObjectLibrary.h | ||
| Gets asset data for assets in a subdirectory. Returns number of assets data loaded | Engine/ObjectLibrary.h | ||
virtual int32 LoadAssetsFromAssetData() |
Load all of the objects in asset data list into memory | Engine/ObjectLibrary.h | |
virtual int32 LoadAssetsFromPath
(
const FString& Path |
Engine/ObjectLibrary.h | ||
| Load an entire subdirectory of assets into this object library. Returns number of assets loaded | Engine/ObjectLibrary.h | ||
virtual int32 LoadBlueprintAssetDataFromPath
(
const FString& Path |
Engine/ObjectLibrary.h | ||
virtual int32 LoadBlueprintAssetDataFromPaths
(
const TArray< FString >& Paths, |
Load an entire subdirectory of blueprints into this object library. | Engine/ObjectLibrary.h | |
virtual int32 LoadBlueprintsFromPath
(
const FString& Path |
Engine/ObjectLibrary.h | ||
virtual int32 LoadBlueprintsFromPaths
(
const TArray< FString >& Paths |
Load an entire subdirectory of blueprints into this object library. | Engine/ObjectLibrary.h | |
virtual void OnAssetRegistryFilesLoaded() |
Handler for when assets have finished scanning in the asset registry | Engine/ObjectLibrary.h | |
FObjectLibraryOnObjectAdded & OnObjectAdded() |
Engine/ObjectLibrary.h | ||
FObjectLibraryOnObjectRemoved & OnObjectRemoved() |
Engine/ObjectLibrary.h | ||
virtual bool RemoveObject
(
UObject* ObjectToRemove |
Attempt to remove an Object from the object, return true if removed | Engine/ObjectLibrary.h | |
virtual void UseWeakReferences
(
bool bSetUseWeak |
Set rather this library is using weak or strong references | Engine/ObjectLibrary.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Engine/ObjectLibrary.h | ||
virtual void PostLoad() |
Engine/ObjectLibrary.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static UObjectLibrary * CreateLibrary
(
UClass* InBaseClass, |
Static function to create a new ObjectLibrary at runtime, with various options set There is now a better version of this functionality in AssetManager, if you are creating many game-specific libraries you should switch to using AssetManager instead | Engine/ObjectLibrary.h |