UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BulkData.h File Reference

Go to the source code of this file.

Classes

class  IBulkDataIORequest
 
struct  FOwnedBulkDataPtr
 
struct  FBulkDataSerializationParams
 
class  FBulkData
 
class  TBulkData< ElementType >
 
class  FFormatContainer
 
class  FBulkDataRequest
 
class  FBulkDataRequest::IHandle
 
class  FBulkDataBatchRequest
 
class  FBulkDataBatchRequest::FBatchBuilder
 
class  FBulkDataBatchRequest::FScatterGatherBuilder
 

Namespaces

namespace  UE
 
namespace  UE::Serialization
 
namespace  UE::BulkData
 
namespace  UE::BulkData::Private
 

Macros

#define USE_RUNTIME_BULKDATA   1
 
#define UE_KEEP_INLINE_RELOADING_CONSISTENT   0
 

Typedefs

using FIoFilenameHash = uint32
 
typedef TFunction< void(bool bWasCancelled, IBulkDataIORequest *)> FBulkDataIORequestCallBack
 
using FByteBulkData = TBulkData< uint8 >
 
using FWordBulkData = TBulkData< uint16 >
 
using FIntBulkData = TBulkData< int32 >
 
using FFloatBulkData = TBulkData< float >
 
using FBulkDataBatchReadRequest = FBulkDataRequest
 

Enumerations

enum  EBulkDataFlags : uint32 {
  BULKDATA_None = 0 , BULKDATA_PayloadAtEndOfFile = 1 << 0 , BULKDATA_SerializeCompressedZLIB = 1 << 1 , BULKDATA_ForceSingleElementSerialization = 1 << 2 ,
  BULKDATA_SingleUse = 1 << 3 , UE_DEPRECATED =(5.3, "This feature is being removed") = 1 << 5 , BULKDATA_ForceInlinePayload = 1 << 6 , BULKDATA_SerializeCompressed = (BULKDATA_SerializeCompressedZLIB) ,
  UE_DEPRECATED =(5.3, "This feature is being removed") = 1 << 5 , BULKDATA_PayloadInSeparateFile = 1 << 8 , UE_DEPRECATED =(5.3, "This feature is being removed") = 1 << 5 , UE_DEPRECATED =(5.3, "This feature is being removed") = 1 << 5 ,
  BULKDATA_Force_NOT_InlinePayload = 1 << 10 , BULKDATA_OptionalPayload = 1 << 11 , BULKDATA_MemoryMappedPayload = 1 << 12 , BULKDATA_Size64Bit = 1 << 13 ,
  BULKDATA_DuplicateNonOptionalPayload = 1 << 14 , UE_DEPRECATED =(5.3, "This feature is being removed") = 1 << 5 , BULKDATA_NoOffsetFixUp = 1 << 16 , BULKDATA_WorkspaceDomainPayload = 1 << 17 ,
  BULKDATA_LazyLoadable = 1 << 18 , BULKDATA_UsesIoDispatcher = 1u << 31u , BULKDATA_DataIsMemoryMapped = 1 << 30 , UE_DEPRECATED =(5.3, "This feature is being removed") = 1 << 5 ,
  BULKDATA_AlwaysAllowDiscard = 1 << 28
}
 
enum  EBulkDataLockStatus { LOCKSTATUS_Unlocked = 0 , LOCKSTATUS_ReadOnlyLock = 1 , LOCKSTATUS_ReadWriteLock = 2 }
 
enum  EBulkDataLockFlags { LOCK_READ_ONLY = 1 , LOCK_READ_WRITE = 2 }
 

Functions

COREUOBJECT_API FIoFilenameHash MakeIoFilenameHash (const FString &Filename)
 
COREUOBJECT_API FIoFilenameHash MakeIoFilenameHash (const FPackagePath &Filename)
 
COREUOBJECT_API FIoFilenameHash MakeIoFilenameHash (const FIoChunkId &ChunkID)
 
COREUOBJECT_API FStringBuilderBaseLexToString (EBulkDataFlags Flags, FStringBuilderBase &Sb)
 
COREUOBJECT_API FString LexToString (EBulkDataFlags Flags)
 
FArchiveoperator<< (FArchive &Ar, EBulkDataFlags &Flags)
 

Variables

const FIoFilenameHash INVALID_IO_FILENAME_HASH = 0
 

Macro Definition Documentation

◆ UE_KEEP_INLINE_RELOADING_CONSISTENT

#define UE_KEEP_INLINE_RELOADING_CONSISTENT   0

◆ USE_RUNTIME_BULKDATA

#define USE_RUNTIME_BULKDATA   1

Typedef Documentation

◆ FBulkDataBatchReadRequest

Handle to a bulk data I/O batch read request.

◆ FBulkDataIORequestCallBack

Callback to use when making streaming requests

◆ FByteBulkData

◆ FFloatBulkData

◆ FIntBulkData

◆ FIoFilenameHash

A loose hash value that can be created from either a filenames or a FIoChunkId

◆ FWordBulkData

Enumeration Type Documentation

◆ EBulkDataFlags

Flags serialized with the bulk data.

Enumerator
BULKDATA_None 

Empty flag set.

BULKDATA_PayloadAtEndOfFile 

Indicates that when the payload was saved/cooked as part of a package was stored at the end of the package file rather than inline.

BULKDATA_SerializeCompressedZLIB 

If set, payload should be [un]compressed using ZLIB during serialization.

BULKDATA_ForceSingleElementSerialization 

Force usage of SerializeElement over bulk serialization.

BULKDATA_SingleUse 

When set the payload will be unloaded from memory after it has been accessed via Lock/::Unlock. Other forms of accessing the payload are unaffected by this flag.

UE_DEPRECATED 

DEPRECATED

Forces the payload to be always streamed, regardless of its size.

BULKDATA_ForceInlinePayload 

Should be set before saing/cooking to force the internal payload to be stored inline

BULKDATA_SerializeCompressed 
See also
BULKDATA_SerializeCompressedZLIB
UE_DEPRECATED 

DEPRECATED

Forces the payload to be always streamed, regardless of its size.

BULKDATA_PayloadInSeparateFile 

Set when the bulkdata saved/cooked as part of a package indicates that the payload is stored in its own file (.ubulk, .uptnl or .m.ubulk depending on other flags)

UE_DEPRECATED 

DEPRECATED

Forces the payload to be always streamed, regardless of its size.

UE_DEPRECATED 

DEPRECATED

Forces the payload to be always streamed, regardless of its size.

BULKDATA_Force_NOT_InlinePayload 

Should be set before being cooked as part of a package to force the cooked payload to before stored at the end of the package file either than being inline

BULKDATA_OptionalPayload 

During cooking, this flag indicates that the the payload is optional at runtime and should be stored in an .uptnl file, unless the payload is also set to be inline in which case this flag is ignored. This flag will be preserved during cooking and and at runtime and can be used to identify where the payload should be loaded from.

BULKDATA_MemoryMappedPayload 

During cooking this flag indicates that the payload should work with memory mapping at runtime if the target cooking platform supports it so the payload should be stored in a .m.ubulk file, unless the payload is also set to be inline in which case this flag is ignored. This flag will be preserved during cooking and and at runtime and can be used to identify where the payload should be loaded from.

BULKDATA_Size64Bit 

Set during serialization to indicate if the size and offset values were serialized as int64 types rather than the default int32

BULKDATA_DuplicateNonOptionalPayload 

During cooking this flag indicates that although the payload is NOT optional it should be stored in both the .ubulk file and the .uptnl file as duplicate non-optional data, unless the payload is also set to be inline in which case this flag is ignored. This flag will be preserved during cooking and and at runtime and can be used to identify where the payload should be loaded from.

UE_DEPRECATED 

DEPRECATED

Forces the payload to be always streamed, regardless of its size.

BULKDATA_NoOffsetFixUp 

Set during saving and indicates that the payload offset value is correct and does not need adjusting via an additional offset stored in the FLinker (older legacy behavior)

BULKDATA_WorkspaceDomainPayload 

INTERNAL SET ONLY - callers of bulkdata should not set this flag on the bulk data If set, payload is stored in the workspace domain version of the file.

BULKDATA_LazyLoadable 

INTERNAL SET ONLY - callers of bulkdata should not set this flag on the bulk data If true, the BulkData can be loaded from its file at any time

BULKDATA_UsesIoDispatcher 

Assigned at runtime to indicate that the BulkData should be using the IoDispatcher when loading, not filepaths.

BULKDATA_DataIsMemoryMapped 

Assigned at runtime to indicate that the BulkData allocation is a memory mapped region of a file and not raw data.

UE_DEPRECATED 

DEPRECATED

Forces the payload to be always streamed, regardless of its size.

BULKDATA_AlwaysAllowDiscard 

Assigned at runtime to indicate that the BulkData object should be considered for discard even if it cannot load from disk.

◆ EBulkDataLockFlags

Enumeration for bulk data lock behavior

Enumerator
LOCK_READ_ONLY 
LOCK_READ_WRITE 

◆ EBulkDataLockStatus

Enumeration for bulk data lock status.

Enumerator
LOCKSTATUS_Unlocked 

Unlocked array

LOCKSTATUS_ReadOnlyLock 

Locked read-only

LOCKSTATUS_ReadWriteLock 

Locked read-write-realloc

Function Documentation

◆ LexToString() [1/2]

COREUOBJECT_API FString LexToString ( EBulkDataFlags  Flags)

◆ LexToString() [2/2]

◆ MakeIoFilenameHash() [1/3]

COREUOBJECT_API FIoFilenameHash MakeIoFilenameHash ( const FIoChunkId ChunkID)

Helpers to create the hash from a chunk id. Returns IOFILENAMEHASH_NONE if and only if the chunk id is invalid.

◆ MakeIoFilenameHash() [2/3]

COREUOBJECT_API FIoFilenameHash MakeIoFilenameHash ( const FPackagePath Filename)

Helpers to create the hash from a FPackagePath. Returns IOFILENAMEHASH_NONE if and only if the PackagePath is empty.

◆ MakeIoFilenameHash() [3/3]

COREUOBJECT_API FIoFilenameHash MakeIoFilenameHash ( const FString &  Filename)

Helpers to create the hash from a filename. Returns IOFILENAMEHASH_NONE if and only if the filename is empty.

◆ operator<<()

FArchive & operator<< ( FArchive Ar,
EBulkDataFlags Flags 
)
inline

Allows FArchive to serialize EBulkDataFlags, this will not be required once EBulkDataFlags is promoted to be a enum class.

Variable Documentation

◆ INVALID_IO_FILENAME_HASH

const FIoFilenameHash INVALID_IO_FILENAME_HASH = 0
inline