![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "Concepts/SameAs.h"#include "Containers/Array.h"#include "Containers/ArrayView.h"#include "Containers/ContainerAllocationPolicies.h"#include "Containers/ContainersFwd.h"#include "Containers/Map.h"#include "Containers/Set.h"#include "Containers/SparseArray.h"#include "Containers/StringFwd.h"#include "Containers/StringView.h"#include "Containers/UnrealString.h"#include "CoreGlobals.h"#include "CoreTypes.h"#include "Delegates/Delegate.h"#include "Internationalization/Text.h"#include "Logging/LogMacros.h"#include "Logging/LogVerbosity.h"#include "Misc/AssertionMacros.h"#include "Misc/EnumClassFlags.h"#include "Misc/OutputDeviceRedirector.h"#include "Misc/PackagePath.h"#include "Serialization/ArchiveUObject.h"#include "Serialization/MemoryLayout.h"#include "Stats/Stats.h"#include "Templates/Function.h"#include "Templates/IsArrayOrRefOfTypeByPredicate.h"#include "Templates/PointerIsConvertibleFromTo.h"#include "Templates/UniquePtr.h"#include "Templates/UnrealTemplate.h"#include "Templates/IsTObjectPtr.h"#include "Traits/IsCharEncodingCompatibleWith.h"#include "UObject/FindObjectFlags.h"#include "UObject/NameTypes.h"#include "UObject/ObjectMacros.h"#include "UObject/ObjectHandle.h"#include "UObject/PrimaryAssetId.h"#include "UObject/Script.h"#include "UObject/TopLevelAssetPath.h"#include "UObject/RemoteObjectTypes.h"#include "UObject/UnrealNames.h"#include "VerseTypesFwd.h"Go to the source code of this file.
Classes | |
| struct | FObjectDuplicationParameters |
| class | FLoadPackageAsyncProgressDelegate |
| struct | FLoadPackageAsyncOptionalParams |
| struct | FUniversallyUniqueObjectNameGenerator |
| struct | FScopedAllowAbstractClassAllocation |
| class | FObjectInitializer |
| struct | FObjectInitializer::FOverrides::FOverrideDetails |
| struct | FObjectInitializer::FSubobjectsToInit::FSubobjectInit |
| struct | FStaticConstructObjectParameters |
| class | FScriptIntegrationObjectHelper |
| class | FScopedObjectFlagMarker |
| class | TObjectArrayIterator< TObjectClass > |
| class | FReferenceCollectorArchive |
| class | FVerySlowReferenceCollectorArchiveScope |
| class | FReferenceCollector |
| struct | FReferenceCollector::AROPrivate |
| class | FReferenceFinder |
| struct | FEndLoadPackageContext |
| struct | FCoreUObjectDelegates |
| class | UE::FAssetLog |
| struct | FAssetMsg |
| struct | UE::CodeGen::FClassNativeFunction |
Namespaces | |
| namespace | EDuplicateMode |
| namespace | UE |
| namespace | UE::RemoteObject |
| namespace | UE::RemoteObject::Serialization |
| namespace | EAsyncLoadingResult |
| namespace | EAsyncPackageState |
| namespace | UE::Core |
| namespace | UE::Core::Private |
| implementation | |
| namespace | UE::CodeGen |
Macros | |
| #define | INVALID_OBJECT (UObject*)-1 |
| #define | PERF_TRACK_DETAILED_ASYNC_STATS (0) |
| #define | UE_GC_RUN_WEAKPTR_BARRIERS 0 |
| #define | UE_REFERENCE_COLLECTOR_REQUIRE_OBJECTPTR_DEPRECATED(...) |
| #define | ASSET_LOG_FORMAT_STRING_ANSI "[AssetLog] %s: " |
| #define | ASSET_LOG_FORMAT_STRING TEXT(ASSET_LOG_FORMAT_STRING_ANSI) |
| #define | UE_ASSET_LOG(CategoryName, Verbosity, Asset, Format, ...) |
| #define | METADATA_PARAMS(x, y) |
| #define | IF_WITH_METADATA(...) |
| #define | IF_WITH_EDITOR(x, y) y |
| #define | IF_WITH_EDITORONLY_DATA(x, y) y |
| #define | IF_WITH_VERSE_VM(x, y) y |
Typedefs | |
| typedef int32 | TAsyncLoadPriority |
| typedef void(* | SetterFuncPtr) (void *InContainer, const void *InValue) |
| typedef void(* | GetterFuncPtr) (const void *InContainer, void *OutValue) |
| #define ASSET_LOG_FORMAT_STRING TEXT(ASSET_LOG_FORMAT_STRING_ANSI) |
| #define IF_WITH_EDITOR | ( | x, | |
| y | |||
| ) | y |
| #define IF_WITH_EDITORONLY_DATA | ( | x, | |
| y | |||
| ) | y |
| #define IF_WITH_METADATA | ( | ... | ) |
| #define IF_WITH_VERSE_VM | ( | x, | |
| y | |||
| ) | y |
| #define METADATA_PARAMS | ( | x, | |
| y | |||
| ) |
| #define PERF_TRACK_DETAILED_ASYNC_STATS (0) |
A macro that outputs a formatted message to log with a canonical reference to an asset if a given logging category is active at a given verbosity level
| CategoryName | name of the logging category |
| Verbosity,verbosity | level to test against |
| Asset,Object | or asset path to format |
| Format,format | text |
| #define UE_GC_RUN_WEAKPTR_BARRIERS 0 |
| #define UE_REFERENCE_COLLECTOR_REQUIRE_OBJECTPTR_DEPRECATED | ( | ... | ) |
Property setter and getter wrapper function pointer
The type that represents an async loading priority
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
FObjectInitializer options
| Enumerator | |
|---|---|
| None | |
| CopyTransientsFromClassDefaults | |
| InitializeProperties | |
|
strong |
|
strong |
|
strong |
| COREUOBJECT_API void BeginLoad | ( | FUObjectSerializeContext * | LoadContext, |
| const TCHAR * | DebugContext = nullptr |
||
| ) |
UObjects are being loaded between these calls
| COREUOBJECT_API void CancelAsyncLoading | ( | ) |
Cancels all async package loading requests.
| COREUOBJECT_API void CollectGarbage | ( | EObjectFlags | KeepFlags, |
| bool | bPerformFullPurge = true |
||
| ) |
Deletes all unreferenced objects, keeping objects that have any of the passed in KeepFlags set. Will wait for other threads to unlock GC.
| KeepFlags | objects with those flags will be kept regardless of being referenced or not |
| bPerformFullPurge | if true, perform a full purge after the mark pass |
| COREUOBJECT_API EDataValidationResult CombineDataValidationResults | ( | EDataValidationResult | Result1, |
| EDataValidationResult | Result2 | ||
| ) |
Combines two different data validation results and returns the combined result.
| Result1 | One of the data validation results to be combined |
| Result2 | One of the data validation results to be combined |
Anything combined with an Invalid result is Invalid. Any result combined with a NotValidated result is the same result
The combined results should match the following matrix
| NotValidated | Valid | Invalid
----------—+----------------—+--------—+-------— NotValidated | NotValidated | Valid | Invalid Valid | Valid | Valid | Invalid Invalid | Invalid | Invalid | Invalid
| bool ContainsObjectOfClass | ( | const TArray< T * > & | ObjectArray, |
| UClass * | ClassToCheck, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None, |
||
| TArray< T * > * | out_Objects = nullptr |
||
| ) |
Determines whether the specified array contains objects of the specified class.
| ObjectArray | the array to search - must be an array of pointers to instances of a UObject-derived class |
| ClassToCheck | the object class to search for |
| Flags | Flags which control the search |
| out_Objects | if specified, any objects that match the SearchClass will be added to this array |
| UE_NODEBUG UE_FORCEINLINE_HINT bool ContainsObjectOfClass | ( | const TArray< T * > & | ObjectArray, |
| UClass * | ClassToCheck, | ||
| ExactClassType | bExactClass, | ||
| TArray< T * > * | out_Objects = nullptr |
||
| ) |
| COREUOBJECT_API UPackage * CreatePackage | ( | const TCHAR * | PackageName | ) |
Find an existing package by name or create it if it doesn't exist
| DECLARE_CYCLE_STAT_EXTERN | ( | TEXT("AllocateObject") | , |
| STAT_AllocateObject | , | ||
| STATGROUP_ObjectVerbose | |||
| ) |
| DECLARE_CYCLE_STAT_EXTERN | ( | TEXT("ConstructObject") | , |
| STAT_ConstructObject | , | ||
| STATGROUP_Object | |||
| ) |
| DECLARE_CYCLE_STAT_EXTERN | ( | TEXT("LoadConfig") | , |
| STAT_LoadConfig | , | ||
| STATGROUP_Object | |||
| ) |
| DECLARE_CYCLE_STAT_EXTERN | ( | TEXT("LoadObject") | , |
| STAT_LoadObject | , | ||
| STATGROUP_Object | |||
| ) |
| DECLARE_CYCLE_STAT_EXTERN | ( | TEXT("PostConstructInitializeProperties") | , |
| STAT_PostConstructInitializeProperties | , | ||
| STATGROUP_ObjectVerbose | |||
| ) |
| DECLARE_CYCLE_STAT_EXTERN | ( | TEXT("~UObject") | , |
| STAT_DestroyObject | , | ||
| STATGROUP_Object | |||
| ) |
| DECLARE_CYCLE_STAT_WITH_FLAGS_EXTERN | ( | TEXT("InitProperties") | , |
| STAT_InitProperties | , | ||
| STATGROUP_Object | , | ||
| EStatFlags::Verbose | |||
| ) |
| DECLARE_DELEGATE_ThreeParams | ( | FLoadAssetAsyncDelegate | , |
| const FTopLevelAssetPath & | , | ||
| UObject * | , | ||
| EAsyncLoadingResult::Type | |||
| ) |
Delegate called on completion of async asset loading
| AssetPath | Path of the asset we were trying to load |
| LoadedObject | Loaded object if successful, nullptr otherwise |
| Result | Result of async loading. Optional parameters passed to the LoadAssetAsync function. |
Thread-safe delegate to be invoked at different state of progress for the given package.
Loading priority.
Additional context to map object names to their instanced counterpart when loading an instanced package.
Flags controlling loading behavior, from the ELoadFlags enum.
| DECLARE_DELEGATE_ThreeParams | ( | FLoadPackageAsyncDelegate | , |
| const FName & | , | ||
| UPackage * | , | ||
| EAsyncLoadingResult::Type | |||
| ) |
Delegate called on completion of async package loading
| PackageName | Package name we were trying to load |
| LoadedPackage | Loaded package if successful, nullptr otherwise |
| Result | Result of async loading. Parameters passed to the FLoadPackageAsyncProgressDelegate callback. |
| DECLARE_DWORD_ACCUMULATOR_STAT_EXTERN | ( | TEXT("NameTable ANSI Entries") | , |
| STAT_NameTableAnsiEntries | , | ||
| STATGROUP_Object | |||
| ) |
| DECLARE_DWORD_ACCUMULATOR_STAT_EXTERN | ( | TEXT("NameTable Entries") | , |
| STAT_NameTableEntries | , | ||
| STATGROUP_Object | |||
| ) |
| DECLARE_DWORD_ACCUMULATOR_STAT_EXTERN | ( | TEXT("NameTable Wide Entries") | , |
| STAT_NameTableWideEntries | , | ||
| STATGROUP_Object | |||
| ) |
| DECLARE_DWORD_COUNTER_STAT_EXTERN | ( | TEXT("FindObject") | , |
| STAT_FindObject | , | ||
| STATGROUP_ObjectVerbose | |||
| ) |
| DECLARE_DWORD_COUNTER_STAT_EXTERN | ( | TEXT("FindObjectFast") | , |
| STAT_FindObjectFast | , | ||
| STATGROUP_ObjectVerbose | |||
| ) |
| COREUOBJECT_API DECLARE_LOG_CATEGORY_EXTERN | ( | LogUObjectGlobals | , |
| Log | , | ||
| All | |||
| ) |
| DECLARE_MEMORY_STAT_EXTERN | ( | TEXT("NameTable Memory Size") | , |
| STAT_NameTableMemorySize | , | ||
| STATGROUP_Object | |||
| ) |
| T * DuplicateObject | ( | const TObjectPtr< T > & | SourceObject, |
| UObject * | Outer, | ||
| const FName | Name = NAME_None |
||
| ) |
| T * DuplicateObject | ( | T const * | SourceObject, |
| UObject * | Outer, | ||
| const FName | Name = NAME_None |
||
| ) |
Convenience template for duplicating an object
| SourceObject | the object being copied |
| Outer | the outer to use for the object |
| Name | the optional name of the object |
| COREUOBJECT_API UObject * DuplicateObject_Internal | ( | UClass * | Class, |
| const UObject * | SourceObject, | ||
| UObject * | Outer, | ||
| const FName | NAME_None | ||
| ) |
Convenience function for duplicating an object
| Class | the class of the object being copied |
| SourceObject | the object being copied |
| Outer | the outer to use for the object |
| Name | the optional name of the object |
| COREUOBJECT_API void EndLoad | ( | FUObjectSerializeContext * | LoadContext | ) |
| ENUM_CLASS_FLAGS | ( | EFindFirstObjectOptions | ) |
| ENUM_CLASS_FLAGS | ( | EUniqueObjectNameOptions | ) |
| COREUOBJECT_API void FinalizeIncrementalReachabilityAnalysis | ( | ) |
Finalizes incremental reachability analysis (if currently running) without any time limit
| COREUOBJECT_API UFunction * FindDelegateSignature | ( | FName | DelegateSignatureName | ) |
Looks for delegate signature with given name.
|
inline |
Find an optional object with proper handling of potential ambiguity.
|
inline |
Find an optional object with proper handling of potential ambiguity without asserting on GIsSavingPackage or IsGarbageCollecting()
|
inline |
Find an optional object.
| UE_NODEBUG UE_FORCEINLINE_HINT T * FindObject | ( | FTopLevelAssetPath | InPath, |
| ExactClassType | bExactClass | ||
| ) |
|
inline |
Find an optional object.
| UE_NODEBUG UE_FORCEINLINE_HINT T * FindObject | ( | UObject * | Outer, |
| FStringView | Name, | ||
| ExactClassType | bExactClass | ||
| ) |
|
inline |
Find an optional object, no failure allowed
| UE_NODEBUG UE_FORCEINLINE_HINT T * FindObjectChecked | ( | UObject * | Outer, |
| FStringView | Name, | ||
| ExactClassType | bExactClass | ||
| ) |
|
inline |
Find an optional object, relies on the name being unqualified
| UE_NODEBUG UE_FORCEINLINE_HINT T * FindObjectFast | ( | UObject * | Outer, |
| FName | Name, | ||
| ExactClassType | bExactClass, | ||
| EObjectFlags | ExclusiveFlags = RF_NoFlags |
||
| ) |
|
inline |
Find an optional object.
| UE_NODEBUG UE_FORCEINLINE_HINT T * FindObjectSafe | ( | FTopLevelAssetPath | InPath, |
| ExactClassType | bExactClass | ||
| ) |
|
inline |
Find an object without asserting on GIsSavingPackage or IsGarbageCollectingAndLockingUObjectHashTables()
| UE_NODEBUG UE_FORCEINLINE_HINT T * FindObjectSafe | ( | UObject * | Outer, |
| FStringView | Name, | ||
| ExactClassType | bExactClass | ||
| ) |
| COREUOBJECT_API UPackage * FindPackage | ( | UObject * | InOuter, |
| const TCHAR * | PackageName | ||
| ) |
Find an existing package by name
| InOuter | The Outer object to search inside |
| PackageName | The name of the package to find |
| COREUOBJECT_API void FlushAsyncLoading | ( | int32 | PackageID = INDEX_NONE | ) |
Blocks till all pending package/ linker requests are fulfilled.
| PackageID | if the package associated with this request ID gets loaded, FlushAsyncLoading returns immediately without waiting for the remaining packages to finish loading. |
| COREUOBJECT_API void FlushAsyncLoading | ( | TConstArrayView< int32 > | RequestIds | ) |
Blocks till a set of pending async load requests are complete.
| RequestIds | list of return values from LoadPackageAsync to wait for. An empty list means all requests |
| COREUOBJECT_API void GatherUnreachableObjects | ( | bool | bForceSingleThreaded | ) |
Gathers unreachable objects for IncrementalPurgeGarbage.
| bForceSingleThreaded | true to force the process to just one thread |
| COREUOBJECT_API bool GetAllowNativeComponentClassOverrides | ( | ) |
Utility accessor for whether we are running with component class overrides enabled
| COREUOBJECT_API float GetAsyncLoadPercentage | ( | const FName & | PackageName | ) |
Returns the async load percentage for a package in flight with the passed in name or -1 if there isn't one.
| PackageName | Name of package to query load percentage for |
| COREUOBJECT_API FString GetConfigFilename | ( | UObject * | SourceObject | ) |
Returns the file to load ini values from for the specified object, taking into account PerObjectConfig-ness
|
inline |
Get default object of a class.
|
inline |
Get default object of a class.
Gets the default object of a class.
In most cases, class default objects should not be modified. This method therefore returns an immutable pointer. If you need to modify the default object, use GetMutableDefault instead.
| Class | - The class to get the CDO for. |
| COREUOBJECT_API UScriptStruct * GetFallbackStruct | ( | ) |
A struct used as stub for deleted ones.
| COREUOBJECT_API const FString * GetIniFilenameFromObjectsReference | ( | const FString & | ObjectsReferenceString | ) |
Gets INI file name from object's reference if it contains one.
|
inline |
Version of GetDefault() that allows modification
|
inline |
Version of GetDefault() that allows modification
Gets the mutable default object of a class.
| Class | - The class to get the CDO for. |
| COREUOBJECT_API int32 GetNumAsyncPackages | ( | ) |
Return number of active async load package requests
| COREUOBJECT_API UObject * GetTransientOuterForRename | ( | UClass * | ForClass | ) |
Returns an object in the transient package which respects the rules of Within
| COREUOBJECT_API UPackage * GetTransientPackage | ( | ) |
Returns the transient top-level package, which is useful for temporarily storing objects that should never be saved
| COREUOBJECT_API UObject * GetTransientPackageAsObject | ( | ) |
| void GlobalSetProperty | ( | const TCHAR * | Value, |
| UClass * | Class, | ||
| FProperty * | Property, | ||
| bool | bNotifyObjectOfChange | ||
| ) |
Internal function used to set a specific property value from debug/console code
| COREUOBJECT_API bool HasUniversallyUniqueObjectNameIdentifier | ( | FName | Name | ) |
Checks if the given FName is marked as a Universally Unique Object Name. Note: This is an early out check. This function may return true for FNames that are not Universally Unique Object Names.
| Name | The name to check. |
| COREUOBJECT_API void IncrementalPurgeGarbage | ( | bool | bUseTimeLimit, |
| double | TimeLimit | ||
| ) |
Incrementally purge garbage by deleting all unreferenced objects after routing Destroy.
Calling code needs to be EXTREMELY careful when and how to call this function as RF_Unreachable cannot change on any objects unless any pending purge has completed!
| bUseTimeLimit | whether the time limit parameter should be used |
| TimeLimit | soft time limit for this function call |
| COREUOBJECT_API FObjectDuplicationParameters InitStaticDuplicateObjectParams | ( | UObject const * | SourceObject, |
| UObject * | DestOuter, | ||
| const FName | DestName = NAME_None, |
||
| EObjectFlags | FlagMask = RF_AllFlags, |
||
| UClass * | DestClass = nullptr, |
||
| EDuplicateMode::Type | DuplicateMode = EDuplicateMode::Normal, |
||
| EInternalObjectFlags | InternalFlagsMask = EInternalObjectFlags_AllFlags |
||
| ) |
Returns FObjectDuplicationParameters initialized based of StaticDuplicateObject parameters
|
inline |
Returns true if a class has been loaded (e.g. it has a CDO)
| COREUOBJECT_API bool IsEventDrivenLoaderEnabled | ( | ) |
Returns true if the event driven loader is enabled in the current build
| COREUOBJECT_API bool IsIncrementalPurgePending | ( | ) |
Returns whether an incremental purge is still pending/ in progress.
| COREUOBJECT_API bool IsIncrementalReachabilityAnalysisPending | ( | ) |
Returns whether an incremental reachability analysis is still pending/ in progress.
| COREUOBJECT_API bool IsIncrementalUnhashPending | ( | ) |
Checks if there's objects pending to be unhashed when running incremental purge
| COREUOBJECT_API bool IsLoading | ( | ) |
Returns whether we are currently loading a package (sync or async)
| COREUOBJECT_API bool IsReferenced | ( | UObject *& | Res, |
| EObjectFlags | KeepFlags, | ||
| EInternalObjectFlags | InternalKeepFlags, | ||
| bool | bCheckSubObjects = false, |
||
| FReferencerInformationList * | FoundReferences = nullptr |
||
| ) |
Returns whether an object is referenced, not counting references from itself
| Res | Object to check |
| KeepFlags | Objects with these flags will be considered as being referenced |
| InternalKeepFlags | Objects with these internal flags will be considered as being referenced |
| bCheckSubObjects | Treat subobjects as if they are the same as passed in object |
| FoundReferences | If non-nullptr fill in with list of objects that hold references |
| COREUOBJECT_API int32 LoadAssetAsync | ( | FTopLevelAssetPath | InAssetPath, |
| FLoadAssetAsyncDelegate | InCompletionDelegate, | ||
| FLoadAssetAsyncOptionalParams | InOptionalParams = FLoadAssetAsyncOptionalParams() |
||
| ) |
Asynchronously load a top level asset along with other objects in the same package. This is non-blocking and will call LoadPackageAsync. FSoftObjectPath::LoadAsync can be used to asynchronously load subobjects.
| InAssetPath | Top level asset to load |
| InCompletionDelegate | Delegate to be invoked when the async load finishes, this will execute on the game thread as soon as the load succeeds or fails |
| InOptionalParams | Optional parameters |
|
inline |
Load a class object
|
inline |
Load an object.
| COREUOBJECT_API UPackage * LoadPackage | ( | UPackage * | InOuter, |
| const FPackagePath & | InPackagePath, | ||
| uint32 | LoadFlags, | ||
| FArchive * | InReaderOverride = nullptr, |
||
| const FLinkerInstancingContext * | InstancingContext = nullptr, |
||
| const FPackagePath * | DiffPackagePath = nullptr |
||
| ) |
Loads a package and all contained objects that match context flags.
| InOuter | Package to load new package into (usually nullptr or ULevel->GetOuter()) |
| InPackagePath | PackagePath to load, must be non-empty |
| LoadFlags | Flags controlling loading behavior, from the ELoadFlags enum |
| InReaderOverride | Optional archive to use for reading package data |
| InLoadContext | Additional context when called during serialization |
| InstancingContext | Additional context to map object names to their instanced counterpart when loading an instanced package |
| DiffPackagePath | An additional PackagePath to load and compare to the package at InPackagePath, used when diffing packages |
| COREUOBJECT_API UPackage * LoadPackage | ( | UPackage * | InOuter, |
| const TCHAR * | InLongPackageName, | ||
| uint32 | LoadFlags, | ||
| FArchive * | InReaderOverride = nullptr, |
||
| const FLinkerInstancingContext * | InstancingContext = nullptr |
||
| ) |
Loads a package and all contained objects that match context flags.
| InOuter | Package to load new package into (usually nullptr or ULevel->GetOuter()) |
| InLongPackageName | Long package name to load, if null the name is taken from InOuter |
| LoadFlags | Flags controlling loading behavior, from the ELoadFlags enum |
| InReaderOverride | Optional archive to use for reading package data |
| InLoadContext | Additional context when called during serialization |
| InstancingContext | Additional context to map object names to their instanced counterpart when loading an instanced package |
| COREUOBJECT_API int32 LoadPackageAsync | ( | const FPackagePath & | InPackagePath, |
| FLoadPackageAsyncOptionalParams | InOptionalParams | ||
| ) |
Asynchronously load a package and all contained objects that match context flags. Non-blocking. Use this version to specify the PackagePath rather than having the other versions internally convert the InName to a PackagePath by searching the current package mount points. Use this version if you need to specify a packagename that is different from the packagename on disk; this is useful when loading multiple copies of the same package.
| InPackagePath | PackagePath to load. Must be a mounted path. The package is created if it does not already exist. |
| InOptionalParams | Optional parameters. |
| COREUOBJECT_API int32 LoadPackageAsync | ( | const FPackagePath & | InPackagePath, |
| FName | InPackageNameToCreate = NAME_None, |
||
| FLoadPackageAsyncDelegate | InCompletionDelegate = FLoadPackageAsyncDelegate(), |
||
| EPackageFlags | InPackageFlags = PKG_None, |
||
| int32 | InPIEInstanceID = INDEX_NONE, |
||
| TAsyncLoadPriority | InPackagePriority = 0, |
||
| const FLinkerInstancingContext * | InstancingContext = nullptr, |
||
| uint32 | LoadFlags = LOAD_None |
||
| ) |
Asynchronously load a package and all contained objects that match context flags. Non-blocking. Use this version to specify the PackagePath rather than having the other versions internally convert the InName to a PackagePath by searching the current package mount points. Use this version if you need to specify a packagename that is different from the packagename on disk; this is useful when loading multiple copies of the same package.
| InPackagePath | PackagePath to load. Must be a mounted path. The package is created if it does not already exist. |
| InPackageNameToCreate | If not none, this is the name of the package to load the bytes on disk into (and create if not yet existing). If none, the name is taken from PackagePath. |
| InCompletionDelegate | Delegate to be invoked when the packages has finished streaming |
| InPackageFlags | Package flags used to construct loaded package in memory |
| InPIEInstanceID | Play in Editor instance ID |
| InPackagePriority | Loading priority |
| InstancingContext | Additional context to map object names to their instanced counterpart when loading an instanced package |
| LoadFlags | Flags controlling loading behavior, from the ELoadFlags enum |
| COREUOBJECT_API int32 LoadPackageAsync | ( | const FString & | InName, |
| const FGuid * | InGuid = nullptr |
||
| ) |
Asynchronously load a package and all contained objects that match context flags. Non-blocking. Use this version for convenience when you just need to load a package without notification and with default behavior from a packagename/filename.
| InName | PackageName or LocalFilePath of package to load. Must be a mounted name/path. The package is created if it does not already exist. |
| InGuid | GUID of the package to load, or nullptr for "don't care" |
| COREUOBJECT_API int32 LoadPackageAsync | ( | const FString & | InName, |
| FLoadPackageAsyncDelegate | InCompletionDelegate, | ||
| TAsyncLoadPriority | InPackagePriority = 0, |
||
| EPackageFlags | InPackageFlags = PKG_None, |
||
| int32 | InPIEInstanceID = INDEX_NONE |
||
| ) |
Asynchronously load a package and all contained objects that match context flags. Non-blocking. Use this version when you need to load a package with default behavior from a packagename/filename, and need to be notified when it is loaded.
| InName | PackageName or LocalFilePath of package to load. Must be a mounted name/path. The package is created if it does not already exist. |
| InCompletionDelegate | Delegate to be invoked when the packages has finished streaming |
| InPackagePriority | Loading priority |
| InPackageFlags | Package flags used to construct loaded package in memory |
| InPIEInstanceID | Play in Editor instance ID |
| COREUOBJECT_API int32 LoadPackageAsync | ( | const FString & | InName, |
| FLoadPackageAsyncOptionalParams | InOptionalParams | ||
| ) |
Asynchronously load a package and all contained objects that match context flags. Non-blocking. Use this version when you need to load a package with default behavior from a packagename/filename, and need to be notified when it is loaded.
| InName | PackageName or LocalFilePath of package to load. Must be a mounted name/path. The package is created if it does not already exist. |
| InOptionalParams | Optional parameters. |
| COREUOBJECT_API FName MakeObjectNameFromDisplayLabel | ( | const FString & | DisplayLabel, |
| const FName | CurrentObjectName | ||
| ) |
Given a display label string, generates an FName slug that is a valid FName for that label. If the object's current name is already satisfactory, then that name will be returned. For example, "[MyObject]: Object Label" becomes "MyObjectObjectLabel" FName slug.
Note: The generated name isn't guaranteed to be unique.
| DisplayLabel | The label string to convert to an FName |
| CurrentObjectName | The object's current name, or NAME_None if it has no name yet |
| COREUOBJECT_API FName MakeUniqueObjectName | ( | UObject * | Outer, |
| const UClass * | Class, | ||
| FName | BaseName = NAME_None, |
||
| EUniqueObjectNameOptions | Options = EUniqueObjectNameOptions::None |
||
| ) |
Create a unique name by combining a base name and an arbitrary number string. The object name returned is guaranteed not to exist.
| Outer | the outer for the object that needs to be named |
| Class | the class for the object |
| BaseName | optional base name to use when generating the unique object name; if not specified, the class's name is used |
| Options | Additional options. See EUniqueObjectNameOptions. |
| COREUOBJECT_API FName MakeUniversallyUniqueObjectName | ( | UObject * | Outer, |
| FName | InBaseName = NAME_None, |
||
| FUniversallyUniqueObjectNameGenerator const * | Generator = nullptr |
||
| ) |
Create a universally unique name by combining a base name, a GUID and a timestamp. The object name returned is guaranteed not to locally and globally exist.
| Outer | the outer for the object that needs to be named |
| BaseName | optional base name to use when generating the globally unique object name. |
| Generator | optional generator session that can be passed to not use instead of the global one. |
| FUNCTION_NON_NULL_RETURN_START T * NewObject | ( | UObject * | Outer, |
| const UClass * | Class, | ||
| FName | Name = NAME_None, |
||
| EObjectFlags | Flags = RF_NoFlags, |
||
| UObject * | Template = nullptr, |
||
| bool | bCopyTransientsFromClassDefaults = false, |
||
| FObjectInstancingGraph * | InInstanceGraph = nullptr, |
||
| UPackage * | InExternalPackage = nullptr |
||
| ) |
Convenience template for constructing a gameplay object
| Outer | the outer for the new object. If not specified, object will be created in the transient package. |
| Class | the class of object to construct |
| Name | the name for the new object. If not specified, the object will be given a transient name via MakeUniqueObjectName |
| Flags | the object flags to apply to the new object |
| Template | the object to use for initializing the new object. If not specified, the class's default object will be used |
| bCopyTransientsFromClassDefaults | if true, copy transient from the class defaults instead of the pass in archetype ptr (often these are the same) |
| InInstanceGraph | contains the mappings of instanced objects and components to their templates |
| InExternalPackage | Assign an external Package to the created object if non-null |
| RemoteId | Globally unique id for this object |
| FUNCTION_NON_NULL_RETURN_START T * NewObject | ( | UObject * | Outer, |
| FName | Name, | ||
| EObjectFlags | Flags = RF_NoFlags, |
||
| UObject * | Template = nullptr, |
||
| bool | bCopyTransientsFromClassDefaults = false, |
||
| FObjectInstancingGraph * | InInstanceGraph = nullptr, |
||
| UPackage * | InExternalPackage = nullptr |
||
| ) |
| FUNCTION_NON_NULL_RETURN_START T * NewObject | ( | UObject * | Outer = GetTransientPackageAsObject() | ) |
|
inline |
|
inline |
Parse a reference to an object from the input stream.
|
inline |
| COREUOBJECT_API bool ParseObject | ( | const TCHAR * | Stream, |
| const TCHAR * | Match, | ||
| UClass * | Class, | ||
| UObject *& | DestRes, | ||
| UObject * | InParent, | ||
| EParseObjectLoadingPolicy | LoadingPolicy, | ||
| bool * | bInvalidObject = nullptr |
||
| ) |
Parse a reference to an object from a text representation
| Stream | String containing text to parse |
| Match | Tag to search for object representation within string |
| Class | The class of the object to be found. |
| DestRes | Returned object pointer |
| InParent | Outer to search @oaran LoadingPolicy Controls whether the parse will attempt to load a fully qualified object reference, if needed. |
| bInvalidObject | [opt] Optional output. If true, Tag was matched but the specified object wasn't found. |
| COREUOBJECT_API TArray< const TCHAR * > ParsePropertyFlags | ( | EPropertyFlags | Flags | ) |
Parses a bit mask of property flags into an array of string literals that match the flags
| COREUOBJECT_API void PerformIncrementalReachabilityAnalysis | ( | double | TimeLimit | ) |
Incrementally perform reachability analysis
| TimeLimit | Time limit (in seconds) for this function call. 0.0 results in no time limit being used. |
| COREUOBJECT_API EAsyncPackageState::Type ProcessAsyncLoading | ( | bool | bUseTimeLimit, |
| bool | bUseFullTimeLimit, | ||
| double | TimeLimit | ||
| ) |
Serializes a bit of data each frame with a soft time limit. The function is designed to be able to fully load a package in a single pass given sufficient time.
| bUseTimeLimit | Whether to use a time limit |
| bUseFullTimeLimit | If true, use the entire time limit even if blocked on I/O |
| TimeLimit | Soft limit of time this function is allowed to consume |
| COREUOBJECT_API EAsyncPackageState::Type ProcessAsyncLoadingUntilComplete | ( | TFunctionRef< bool()> | CompletionPredicate, |
| double | TimeLimit | ||
| ) |
Blocks and runs ProcessAsyncLoading until the time limit is hit, the completion predicate returns true, or all async loading is done
| CompletionPredicate | If this returns true, stop loading. This is called periodically as long as loading continues |
| TimeLimit | Hard time limit. 0 means infinite length |
| COREUOBJECT_API FString ResolveIniObjectsReference | ( | const FString & | ObjectReference, |
| const FString * | IniFilename = nullptr, |
||
| bool | bThrow = false |
||
| ) |
Resolves ini object path to string object path. This used to happen automatically in ResolveName but now must be called manually
| ObjectReference | Ini reference, of the form engine-ini:/Script/Engine.Engine.DefaultMaterialName |
| IniFilename | Ini filename. If null it will call GetIniFilenameFromObjectsReference |
| bThrow | If true, will print an error if it can't find the file |
| COREUOBJECT_API bool ResolveName | ( | UObject *& | Outer, |
| FString & | ObjectsReferenceString, | ||
| bool | Create, | ||
| bool | Throw, | ||
| uint32 | LoadFlags = LOAD_None, |
||
| const FLinkerInstancingContext * | InstancingContext = nullptr |
||
| ) |
Internal function that takes a fully qualified or relative object path string and converts it into a path relative to a package. Normally, you should call one of the FindObject or LoadObject functions instead.
| Outer | The package to search within. If null, ObjectsReferenceString be a globally scoped path and this will be filled in with the actual package if found/created |
| ObjectsReferenceString | The object path string to resolve. If it is successfully resolved, this will be replaced with a path relative to Outer |
| Create | If true, it will try to load or create the required package if it is not in memory |
| Throw | If true, it will potentially raise an error if the object cannot be found |
| LoadFlags | Flags to use if Create is true and it needs to load a package, from the ELoadFlags enum |
| InstancingContext | The linker instancing context used to resolve package name during instacning (i.e. when a package file is loaded into a package with a different name) |
| COREUOBJECT_API bool SafeLoadError | ( | UObject * | Outer, |
| uint32 | LoadFlags, | ||
| const TCHAR * | ErrorMessage | ||
| ) |
Internal function used to possibly output an error message, taking into account the outer and LoadFlags. Returns true if a log message was emitted.
| COREUOBJECT_API bool SaveToTransactionBuffer | ( | UObject * | Object, |
| bool | bMarkDirty | ||
| ) |
Save a copy of this object into the transaction buffer if we are currently recording into one (undo/redo). If bMarkDirty is true, will also mark the package as needing to be saved.
| bMarkDirty | If true, marks the package dirty if we are currently recording into a transaction buffer |
| Object | object to save. |
| COREUOBJECT_API void SetAsyncLoadingAllowed | ( | bool | bAllowAsyncLoading | ) |
Allows or disallows async loading (for example async loading is not allowed after the final flush on exit)
| bAllowAsyncLoading | true if async loading should be allowed, false otherwise |
| COREUOBJECT_API void SnapshotTransactionBuffer | ( | UObject * | Object | ) |
Causes the transaction system to emit a snapshot event for the given object if the following conditions are met: a) The object is currently transacting. b) The object has changed since it started transacting.
| Object | object to snapshot. |
| Properties | optional list of properties that have potentially changed on the object (to avoid snapshotting the entire object). |
| COREUOBJECT_API void SnapshotTransactionBuffer | ( | UObject * | Object, |
| TArrayView< const FProperty * > | Properties | ||
| ) |
| COREUOBJECT_API UObject * StaticAllocateObject | ( | const UClass * | Class, |
| UObject * | InOuter, | ||
| FName | Name, | ||
| EObjectFlags | SetFlags, | ||
| EInternalObjectFlags | InternalSetFlags = EInternalObjectFlags::None, |
||
| bool | bCanReuseSubobjects = false, |
||
| bool * | bOutReusedSubobject = nullptr, |
||
| UPackage * | ExternalPackage = nullptr, |
||
| int32 | SerialNumber = 0, |
||
| FRemoteObjectId | RemoteId = FRemoteObjectId(), |
||
| class FGCReconstructionGuard * | GCGuard = nullptr |
||
| ) |
Create a new instance of an object or replace an existing object. If both an Outer and Name are specified, and there is an object already in memory with the same Class, Outer, and Name, the existing object will be destructed, and the new object will be created in its place.
| Class | the class of the object to create |
| InOuter | the object to create this object within (the Outer property for the new object will be set to the value specified here). |
| Name | the name to give the new object. If no value (NAME_None) is specified, the object will be given a unique name in the form of ClassName_#. |
| SetFlags | the ObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. |
| InternalSetFlags | the InternalObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. |
| bCanReuseSubobjects | if set to true, SAO will not attempt to destroy a subobject if it already exists in memory. |
| bOutReusedSubobject | flag indicating if the object is a subobject that has already been created (in which case further initialization is not necessary). |
| ExternalPackage | External Package assigned to the allocated object, if any |
| RemoteId | Globally unique id for this object |
| GCGuard | Special synchronization object that prevents GC from running when reconstructing an object on top of existing one |
| bool StaticAllocateObjectErrorTests | ( | const UClass * | Class, |
| UObject * | InOuter, | ||
| FName | Name, | ||
| EObjectFlags | SetFlags | ||
| ) |
Check for StaticAllocateObject error; only for use with the editor, make or other commandlets.
| Class | the class of the object to create |
| InOuter | the object to create this object within (the Outer property for the new object will be set to the value specified here). |
| Name | the name to give the new object. If no value (NAME_None) is specified, the object will be given a unique name in the form of ClassName_#. |
| SetFlags | the ObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. |
| COREUOBJECT_API UObject * StaticConstructObject_Internal | ( | const FStaticConstructObjectParameters & | Params | ) |
Create a new instance of an object. The returned object will be fully initialized. If InFlags contains RF_NeedsLoad (indicating that the object still needs to load its object data from disk), components are not instanced (this will instead occur in PostLoad()). The different between StaticConstructObject and StaticAllocateObject is that StaticConstructObject will also call the class constructor on the object and instance any components.
| Params | The parameters to use when construction the object. |
| COREUOBJECT_API UObject * StaticDuplicateObject | ( | UObject const * | SourceObject, |
| UObject * | DestOuter, | ||
| const FName | DestName = NAME_None, |
||
| EObjectFlags | FlagMask = RF_AllFlags, |
||
| UClass * | DestClass = nullptr, |
||
| EDuplicateMode::Type | DuplicateMode = EDuplicateMode::Normal, |
||
| EInternalObjectFlags | InternalFlagsMask = EInternalObjectFlags_AllFlags |
||
| ) |
Creates a copy of SourceObject using the Outer and Name specified, as well as copies of all objects contained by SourceObject.
Any objects referenced by SourceOuter or RootObject and contained by SourceOuter are also copied, maintaining their name relative to SourceOuter. Any references to objects that are duplicated are automatically replaced with the copy of the object.
| SourceObject | The object to duplicate |
| DestOuter | The object to use as the Outer for the copy of SourceObject |
| DestName | The name to use for the copy of SourceObject, if none it will be autogenerated |
| FlagMask | A bitmask of EObjectFlags that should be propagated to the object copies. The resulting object copies will only have the object flags specified copied from their source object. |
| DestClass | Optional class to specify for the destination object. MUST BE SERIALIZATION COMPATIBLE WITH SOURCE OBJECT!!! |
| InternalFlagsMask | Bitmask of EInternalObjectFlags that should be propagated to the object copies. |
| COREUOBJECT_API UObject * StaticDuplicateObjectEx | ( | FObjectDuplicationParameters & | Parameters | ) |
Creates a copy of SourceObject using the Outer and Name specified, as well as copies of all objects contained by SourceObject. Any objects referenced by SourceOuter or RootObject and contained by SourceOuter are also copied, maintaining their name relative to SourceOuter. Any references to objects that are duplicated are automatically replaced with the copy of the object.
| Parameters | Specific options to use when duplicating this object |
| COREUOBJECT_API bool StaticExec | ( | UWorld * | InWorld, |
| const TCHAR * | Cmd, | ||
| FOutputDevice & | Ar = *GLog |
||
| ) |
Parses a global context system console or debug command and executes it.
| InWorld | The world to use as a context, enables certain commands |
| Cmd | Command string to execute |
| Ar | Output device to write results of commands to |
....just skip it
Helper class for only finding object references we "care" about. See operator << for details.
Set of objects ex and implicitly referenced by root based on criteria in << operator.
Constructor, performing serialization of root object.
Src/ root object to serialize.
| COREUOBJECT_API bool StaticFindAllObjects | ( | TArray< UObject * > & | OutFoundObjects, |
| UClass * | Class, | ||
| const TCHAR * | Name, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None |
||
| ) |
Tries to find all objects matching the search parameters in memory. This will handle fully qualified paths of the form /path/packagename.object:subobject and resolve references for you.
| OutFoundObjects | Array of objects matching the search parameters |
| Class | The to be found object's class |
| Name | The object path to search for an object, relative to InOuter |
| Flags | Flags which control the search |
| UE_NODEBUG UE_FORCEINLINE_HINT bool StaticFindAllObjects | ( | TArray< UObject * > & | OutFoundObjects, |
| UClass * | Class, | ||
| const TCHAR * | Name, | ||
| ExactClassType | bExactClass | ||
| ) |
| COREUOBJECT_API bool StaticFindAllObjectsFast | ( | TArray< UObject * > & | OutFoundObjects, |
| UClass * | ObjectClass, | ||
| FName | ObjectName, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None, |
||
| EObjectFlags | ExclusiveFlags = RF_NoFlags, |
||
| EInternalObjectFlags | ExclusiveInternalFlags = EInternalObjectFlags::None |
||
| ) |
Fast version of StaticFindAllObjects that relies on the passed in FName being the object name without any group/package qualifiers. This will find all objects matching the specified name and class.
| OutFoundObjects | Array of objects matching the search parameters |
| ObjectClass | The to be found object's class |
| ObjectName | Object name to look for relative to InOuter |
| Flags | Flags which control the search |
| ExclusiveFlags | Ignores objects that contain any of the specified exclusive flags |
| ExclusiveInternalFlags | Ignores objects that contain any of the specified internal exclusive flags |
| UE_NODEBUG UE_FORCEINLINE_HINT bool StaticFindAllObjectsFast | ( | TArray< UObject * > & | OutFoundObjects, |
| UClass * | ObjectClass, | ||
| FName | ObjectName, | ||
| ExactClassType | bExactClass, | ||
| EObjectFlags | ExclusiveFlags = RF_NoFlags, |
||
| EInternalObjectFlags | ExclusiveInternalFlags = EInternalObjectFlags::None |
||
| ) |
| COREUOBJECT_API bool StaticFindAllObjectsFastSafe | ( | TArray< UObject * > & | OutFoundObjects, |
| UClass * | ObjectClass, | ||
| FName | ObjectName, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None, |
||
| EObjectFlags | ExclusiveFlags = RF_NoFlags, |
||
| EInternalObjectFlags | ExclusiveInternalFlags = EInternalObjectFlags::None |
||
| ) |
Fast version of StaticFindAllObjects that relies on the passed in FName being the object name without any group/package qualifiers. This will find all objects matching the specified name and class. This version of StaticFindAllObjectsFast will not assert on GIsSavingPackage or IsGarbageCollecting()
| OutFoundObjects | Array of objects matching the search parameters |
| ObjectClass | The to be found object's class |
| ObjectName | Object name to look for relative to InOuter |
| Flags | Flags which control the search |
| ExclusiveFlags | Ignores objects that contain any of the specified exclusive flags |
| ExclusiveInternalFlags | Ignores objects that contain any of the specified internal exclusive flags |
| UE_NODEBUG UE_FORCEINLINE_HINT bool StaticFindAllObjectsFastSafe | ( | TArray< UObject * > & | OutFoundObjects, |
| UClass * | ObjectClass, | ||
| FName | ObjectName, | ||
| ExactClassType | bExactClass, | ||
| EObjectFlags | ExclusiveFlags = RF_NoFlags, |
||
| EInternalObjectFlags | ExclusiveInternalFlags = EInternalObjectFlags::None |
||
| ) |
| COREUOBJECT_API bool StaticFindAllObjectsSafe | ( | TArray< UObject * > & | OutFoundObjects, |
| UClass * | Class, | ||
| const TCHAR * | Name, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None |
||
| ) |
Tries to find all objects matching the search parameters in memory. This will handle fully qualified paths of the form /path/packagename.object:subobject and resolve references for you. This version of StaticFindAllObjects will not assert on GIsSavingPackage or IsGarbageCollecting()
| OutFoundObjects | Array of objects matching the search parameters |
| Class | The to be found object's class |
| Name | The object path to search for an object, relative to InOuter |
| Flags | Flags which control the search |
| UE_NODEBUG UE_FORCEINLINE_HINT bool StaticFindAllObjectsSafe | ( | TArray< UObject * > & | OutFoundObjects, |
| UClass * | Class, | ||
| const TCHAR * | Name, | ||
| ExactClassType | bExactClass | ||
| ) |
| COREUOBJECT_API UObject * StaticFindFirstObject | ( | UClass * | Class, |
| FStringView | Name, | ||
| EFindFirstObjectOptions | Options = EFindFirstObjectOptions::None, |
||
| ELogVerbosity::Type | AmbiguousMessageVerbosity = ELogVerbosity::NoLogging, |
||
| const TCHAR * | InCurrentOperation = nullptr |
||
| ) |
Tries to find the first object matching the search parameters in memory. This will handle fully qualified paths of the form /path/packagename.object:subobject and resolve references for you. If multiple objects share the same name the returned object is random and not based on its time of creation unless otherwise specified in Options (see EFindFirstObjectOptions::NativeFirst) This function is slow and should not be used in performance critical situations.
| Class | The to be found object's class |
| Name | The object path to search for an object, relative to InOuter |
| Options | Search options |
| AmbiguousMessageVerbosity | Verbosity with which to print a message if the search result is ambiguous |
| InCurrentOperation | Current operation to be logged with ambiguous search warning |
| COREUOBJECT_API UObject * StaticFindFirstObjectSafe | ( | UClass * | Class, |
| FStringView | Name, | ||
| EFindFirstObjectOptions | Options = EFindFirstObjectOptions::None, |
||
| ELogVerbosity::Type | AmbiguousMessageVerbosity = ELogVerbosity::NoLogging, |
||
| const TCHAR * | InCurrentOperation = nullptr |
||
| ) |
Tries to find the first objects matching the search parameters in memory. This will handle fully qualified paths of the form /path/packagename.object:subobject and resolve references for you. This version of StaticFindFirstObject will not assert on GIsSavingPackage or IsGarbageCollecting() If multiple objects share the same name the returned object is random and not based on its time of creation unless otherwise specified in Options (see EFindFirstObjectOptions::NativeFirst) This function is slow and should not be used in performance critical situations.
| Class | The to be found object's class |
| Name | The object path to search for an object, relative to InOuter |
| Options | Search options |
| AmbiguousMessageVerbosity | Verbosity with which to print a message if the search result is ambiguous |
| InCurrentOperation | Current operation to be logged with ambiguous search warning |
| COREUOBJECT_API UObject * StaticFindObject | ( | UClass * | Class, |
| FTopLevelAssetPath | ObjectPath, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None |
||
| ) |
Tries to find an object in memory. This version uses FTopLevelAssetPath to find the object.
| Class | The to be found object's class |
| ObjectPath | FName pair representing the outer package object and the inner top level object (asset) |
| Flags | Flags which control the search |
| UE_NODEBUG UE_FORCEINLINE_HINT UObject * StaticFindObject | ( | UClass * | Class, |
| FTopLevelAssetPath | ObjectPath, | ||
| ExactClassType | bExactClass | ||
| ) |
| COREUOBJECT_API UObject * StaticFindObject | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FStringView | Name, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None |
||
| ) |
Tries to find an object in memory. This will handle fully qualified paths of the form /path/packagename.object:subobject and resolve references for you.
| Class | The to be found object's class |
| InOuter | Outer object to look inside. If this is null then InName should start with a package name |
| InName | The object path to search for an object, relative to InOuter |
| Flags | Flags which control the search |
| UE_NODEBUG UE_FORCEINLINE_HINT UObject * StaticFindObject | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FStringView | Name, | ||
| ExactClassType | bExactClass | ||
| ) |
| COREUOBJECT_API UObject * StaticFindObjectChecked | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FStringView | Name, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None |
||
| ) |
Version of StaticFindObject() that will assert if the object is not found
| UE_NODEBUG UE_FORCEINLINE_HINT UObject * StaticFindObjectChecked | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FStringView | Name, | ||
| ExactClassType | bExactClass | ||
| ) |
| COREUOBJECT_API UObject * StaticFindObjectFast | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FName | InName, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None, |
||
| EObjectFlags | ExclusiveFlags = RF_NoFlags, |
||
| EInternalObjectFlags | ExclusiveInternalFlags = EInternalObjectFlags::None |
||
| ) |
Fast version of StaticFindObject that relies on the passed in FName being the object name without any group/package qualifiers. This will only find top level packages or subobjects nested directly within a passed in outer.
| Class | The to be found object's class |
| InOuter | Outer object to look inside, if null this will only look for top level packages |
| InName | Object name to look for relative to InOuter |
| Flags | Flags which control the search |
| ExclusiveFlags | Ignores objects that contain any of the specified exclusive flags |
| ExclusiveInternalFlags | Ignores objects that contain any of the specified internal exclusive flags |
| UE_NODEBUG UE_FORCEINLINE_HINT UObject * StaticFindObjectFast | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FName | InName, | ||
| ExactClassType | bExactClass, | ||
| EObjectFlags | ExclusiveFlags = RF_NoFlags, |
||
| EInternalObjectFlags | ExclusiveInternalFlags = EInternalObjectFlags::None |
||
| ) |
| COREUOBJECT_API UObject * StaticFindObjectFastSafe | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FName | InName, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None, |
||
| EObjectFlags | ExclusiveFlags = RF_NoFlags, |
||
| EInternalObjectFlags | ExclusiveInternalFlags = EInternalObjectFlags::None |
||
| ) |
Fast and safe version of StaticFindObject that relies on the passed in FName being the object name without any group/package qualifiers. It will not assert on GIsSavingPackage or IsGarbageCollectingAndLockingUObjectHashTables(). If called from within package saving code or GC, will return nullptr This will only find top level packages or subobjects nested directly within a passed in outer.
| Class | The to be found object's class |
| InOuter | Outer object to look inside, if null this will only look for top level packages |
| InName | Object name to look for relative to InOuter |
| Flags | Flags which control the search |
| ExclusiveFlags | Ignores objects that contain any of the specified exclusive flags |
| ExclusiveInternalFlags | Ignores objects that contain any of the specified internal exclusive flags |
| UE_NODEBUG UE_FORCEINLINE_HINT UObject * StaticFindObjectFastSafe | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FName | InName, | ||
| ExactClassType | bExactClass, | ||
| EObjectFlags | ExclusiveFlags = RF_NoFlags, |
||
| EInternalObjectFlags | ExclusiveInternalFlags = EInternalObjectFlags::None |
||
| ) |
| COREUOBJECT_API UObject * StaticFindObjectSafe | ( | UClass * | Class, |
| FTopLevelAssetPath | ObjectPath, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None |
||
| ) |
Tries to find an object in memory. This version uses FTopLevelAssetPath to find the object. Version of StaticFindObject that will not assert on GIsSavingPackage or IsGarbageCollectingAndLockingUObjectHashTables()
| Class | The to be found object's class |
| ObjectPath | FName pair representing the outer package object and the inner top level object (asset) |
| Flags | Flags which control the search |
| UE_NODEBUG UE_FORCEINLINE_HINT UObject * StaticFindObjectSafe | ( | UClass * | Class, |
| FTopLevelAssetPath | ObjectPath, | ||
| ExactClassType | bExactClass | ||
| ) |
| COREUOBJECT_API UObject * StaticFindObjectSafe | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FStringView | Name, | ||
| EFindObjectFlags | Flags = EFindObjectFlags::None |
||
| ) |
Internal version of StaticFindObject that will not assert on GIsSavingPackage or IsGarbageCollectingAndLockingUObjectHashTables()
| UE_NODEBUG UE_FORCEINLINE_HINT UObject * StaticFindObjectSafe | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FStringView | Name, | ||
| ExactClassType | bExactClass | ||
| ) |
| COREUOBJECT_API UObject * StaticLoadAsset | ( | UClass * | Class, |
| FTopLevelAssetPath | InPath, | ||
| uint32 | LoadFlags = LOAD_None, |
||
| const FLinkerInstancingContext * | InstancingContext = nullptr |
||
| ) |
Find or load an object that is one of the top level assets in a package.
| Class | The class (or a superclass) of the object to be loaded. |
| InPath | FName pair representing the outer package object and the inner top level object (asset) |
| LoadFlags | Flags controlling how to handle loading from disk, from the ELoadFlags enum |
| InstancingContext | InstancingContext used to remap imports when loading a package under a new name |
| COREUOBJECT_API UClass * StaticLoadClass | ( | UClass * | BaseClass, |
| UObject * | InOuter, | ||
| FStringView | Name, | ||
| FStringView | Filename = {}, |
||
| uint32 | LoadFlags = LOAD_None, |
||
| UPackageMap * | Sandbox = nullptr |
||
| ) |
Version of StaticLoadObject() that will load classes
| COREUOBJECT_API UObject * StaticLoadObject | ( | UClass * | Class, |
| UObject * | InOuter, | ||
| FStringView | Name, | ||
| FStringView | Filename = {}, |
||
| uint32 | LoadFlags = LOAD_None, |
||
| UPackageMap * | Sandbox = nullptr, |
||
| bool | bAllowObjectReconciliation = true, |
||
| const FLinkerInstancingContext * | InstancingContext = nullptr |
||
| ) |
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.
| 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 |
| COREUOBJECT_API void StaticTick | ( | float | DeltaTime, |
| bool | bUseFullTimeLimit = true, |
||
| float | AsyncLoadingTime = 0.005f |
||
| ) |
Static UObject tick function, used to verify certain key assumptions and to tick the async loading code.
| DeltaTime | Time in seconds since last call |
| bUseFullTimeLimit | If true, use the entire time limit even if blocked on I/O |
| AsyncLoadingTime | Time in seconds to use for async loading limit |
| COREUOBJECT_API bool TryCollectGarbage | ( | EObjectFlags | KeepFlags, |
| bool | bPerformFullPurge = true |
||
| ) |
Performs garbage collection only if no other thread holds a lock on GC
| KeepFlags | objects with those flags will be kept regardless of being referenced or not |
| bPerformFullPurge | if true, perform a full purge after the mark pass |
| COREUOBJECT_API bool UnhashUnreachableObjects | ( | bool | bUseTimeLimit, |
| double | TimeLimit = 0.0 |
||
| ) |
Calls ConditionalBeginDestroy on unreachable objects
| bUseTimeLimit | whether the time limit parameter should be used |
| TimeLimit | soft time limit for this function call |
| COREUOBJECT_API int32 UpdateSuffixForNextNewObject | ( | UObject * | Parent, |
| const UClass * | Class, | ||
| TFunctionRef< void(int32 &)> | IndexMutator | ||
| ) |
Internal function used to update the suffix to be given to the next newly-created unnamed object.
| COREUOBJECT_API bool UsesPerObjectConfig | ( | UObject * | SourceObject | ) |
Determines whether the specified object should load values using PerObjectConfig rules
|
extern |
This allows loading cooked content in the editor
|
extern |
This allows loading unversioned cooked content in the editor
|
extern |
If non-zero, the engine will attempt to create clusters from asset files
|
extern |
If non-zero, the engine will create Garbage Collector clusters to speed up Garbage Collection
|
extern |
Set while in SavePackage() to advertise that a package is being saved Deprecated, use IsSavingPackage instead
|
extern |
Allows release builds to override not verifying GC assumptions. Useful for profiling as it's hitchy.
If set and VERIFY_DISREGARD_GC_ASSUMPTIONS is true, we verify GC assumptions about "Disregard For GC" objects and clusters.