Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UObjectLibrary
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/ObjectLibrary.h |
Include | #include "Engine/ObjectLibrary.h" |
Syntax
class UObjectLibrary : public UObject
Remarks
Class that holds a library of Objects
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TArray< FAssetData > | AssetDataList | Asset data of objects that will belong in library, possibly not loaded yet |
![]() |
bool | bHasBlueprintClasses | True if this library holds blueprint classes, false if it holds other objects |
![]() |
bool | bIncludeOnlyOnDiskAssets | Whether to set bIncludeOnlyOnDiskAssets when setting up AR filters for discovering asset data |
![]() |
bool | bIsFullyLoaded | True if we've already fully loaded this library, can't do it twice |
![]() |
bool | bIsGlobalAsyncScanEnvironment | True if we are running a build that is already scanning assets globally so we can perhaps avoid scanning paths synchronously |
![]() |
bool | bRecursivePaths | Whether to set bRecursivePaths when setting up AR filters for discovering asset data |
![]() |
bool | bUseWeakReferences | If this library should use weak pointers |
![]() |
TArray< FString > | DeferredAssetDataPaths | The paths that we will query again once assets are finished being discovered |
![]() |
TObjectPtr< UClass > | ObjectBaseClass | Class that Objects must be of. |
![]() |
TArray< TObjectPtr< UObject > > | Objects | List of Objects in library |
![]() |
FObjectLibraryOnObjectAdded | OnObjectAddedEvent | Delegates for when an object is added or removed from this library. |
![]() |
FObjectLibraryOnObjectRemoved | OnObjectRemovedEvent | |
![]() |
TArray< TWeakObjectPtr< UObject > > | WeakObjects | Weak pointers to objects |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UObjectLibrary
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | Attempt to add a new Object, return true if added | |
![]() ![]() |
void | ClearLoaded () |
Clears the current loaded objects and asset data |
![]() ![]() |
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 |
![]() ![]() |
int32 | Returns the number of objects | |
![]() ![]() |
void | GetAssetDataList
(
TArray< FAssetData >& OutAssetData |
Returns the list of asset data |
![]() ![]() |
int32 | Returns the number of objects | |
![]() |
void | GetObjects
(
TArray< T* >& OutObjects |
Fills in a passed in array of objects, casts to proper type |
![]() ![]() |
bool | ||
![]() ![]() |
int32 | LoadAssetDataFromPath
(
const FString& Path |
|
![]() ![]() |
int32 | LoadAssetDataFromPaths
(
const TArray< FString >& Paths, |
Gets asset data for assets in a subdirectory. Returns number of assets data loaded |
![]() ![]() |
int32 | Load all of the objects in asset data list into memory | |
![]() ![]() |
int32 | LoadAssetsFromPath
(
const FString& Path |
|
![]() ![]() |
int32 | LoadAssetsFromPaths
(
const TArray< FString >& Paths |
Load an entire subdirectory of assets into this object library. Returns number of assets loaded |
![]() ![]() |
int32 | LoadBlueprintAssetDataFromPath
(
const FString& Path |
|
![]() ![]() |
int32 | LoadBlueprintAssetDataFromPaths
(
const TArray< FString >& Paths, |
Load an entire subdirectory of blueprints into this object library. |
![]() ![]() |
int32 | LoadBlueprintsFromPath
(
const FString& Path |
|
![]() ![]() |
int32 | LoadBlueprintsFromPaths
(
const TArray< FString >& Paths |
Load an entire subdirectory of blueprints into this object library. |
![]() ![]() |
void | Handler for when assets have finished scanning in the asset registry | |
![]() |
FObjectLibraryOnObjectAdded & | ||
![]() |
FObjectLibraryOnObjectRemoved & | ||
![]() ![]() |
bool | RemoveObject
(
UObject* ObjectToRemove |
Attempt to remove an Object from the object, return true if removed |
![]() ![]() |
void | UseWeakReferences
(
bool bSetUseWeak |
Set rather this library is using weak or strong references |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FObjectLibraryOnObjectAdded | ||
![]() |
FObjectLibraryOnObjectRemoved |