FUntypedBulkData

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/Serialization/BulkData.h

Include

#include "Serialization/BulkData.h"

Syntax

struct FUntypedBulkData

Variables

Name Description

Protected variable

FArchive *

 

AttachedAr

Archive associated with bulk data for serialization

Protected variable

FLinkerLoad ...

 

Linker

Used to make sure the linker doesn't get garbage collected at runtime for things with attached archives

Protected variable

FPackagePath

 

PackagePath

Name of the PackagePath containing the bulkdata

Protected variable

EPackageSegment

 

PackageSegment

Which segment of the package's data in the PackageResourceManager contains the bulkdata

Constructors

Name Description

Public function

FUntypedBulkData()

Constructor, initializing all member variables.

Public function

FUntypedBulkData

(
    const FUntypedBulkData& Other
)

Copy constructor. Use the common routine to perform the copy.

Destructors

Name Description

Public function Virtual

~FUntypedBulkData()

Virtual destructor, free'ing allocated memory.

Functions

Name Description

Public function Const

bool

 

CanLoadBulkDataWithFileReader()

Test if it is possible to load the bulk data using a file reader, even when no archive is attached to the bulk data.

Public function Const

bool

 

CanLoadFromDisk()

Returns true if the data can be loaded from disk.

Public function

void

 

ClearBulkDataFlags

(
    uint32 BulkDataFlagsToClear
)

Clears the passed in bulk data flags.

Public function Static

void

 

ClearBulkDataFlagsOn

(
    EBulkDataFlags& InOutAccumulator,
    EBulkDataFlags FlagsToClear
)

Disable the given flags in the given accumulator variable.

Public function Const

FIoChunkId

 

CreateChunkId()

Returns a FIoChunkId for the bulkdata payload, this will be invalid if the bulkdata is not stored in the IoStore

Public function Const

IBulkDataIOR...

 

CreateStreamingRequest

(
    int64 OffsetInBulkData,
    int64 BytesToRead,
    EAsyncIOPriorityAndFlags Priority,
    FBulkDataIORequestCallBack* Co...,
    uint8* UserSuppliedMemory
)

Create an async read request for the bulk data.

Public function Const

IBulkDataIOR...

 

CreateStreamingRequest

(
    EAsyncIOPriorityAndFlags Priority,
    FBulkDataIORequestCallBack* Co...,
    uint8* UserSuppliedMemory
)

Create an async read request for the bulk data.

Public function Static

IBulkDataIOR...

 

CreateStreamingRequestForRange

(
    const FPackagePath& PackagePath,
    EPackageSegment PackageSegment,
    const BulkDataRangeArray& RangeArr...,
    EAsyncIOPriorityAndFlags Priority,
    FBulkDataIORequestCallBack* Co...
)

Create an async read request for a range of bulk data streaming tokens The request will read all data between the two given streaming tokens objects.

Public function Const

FBulkDataStr...

 

CreateStreamingToken()

Creates a FBulkDataStreamingToken representing the area of the file that the FUntypedBulkData represents.

Public function Const

bool

 

DoesExist()

Returns true if the data references a file that currently exists and can be referenced by the file system.

Public function Static

void

 

DumpBulkDataUsage

(
    FOutputDevice& Log
)

Dumps detailed information of bulk data usage.

Public function

void

 

ForceBulkDataResident()

Forces the bulk data to be resident in memory and detaches the archive.

Public function Const

uint32

 

GetBulkDataAlignment()

Gets the current bulk data alignment.

Public function Const

uint32

 

GetBulkDataFlags()

Gets the current bulk data flags.

Public function Const

int64

 

GetBulkDataOffsetInFile()

Returns the offset into the file the bulk data is located at.

Public function Const

int64

 

GetBulkDataSize()

Returns the size of the bulk data in bytes.

Public function Const

int64

 

GetBulkDataSizeOnDisk()

Returns the size of the bulk data on disk.

Public function

void

 

GetCopy

(
    void** Dest,
    bool bDiscardInternalCopy
)

Retrieves a copy of the bulk data.

Public function

FBulkDataBuf...

 

GetCopyAsBuffer

(
    int64 RequestedElementCount,
    bool bDiscardInternalCopy
)

Returns a copy encapsulated by a FBulkDataBuffer.

Public function

FCustomVersi...

 

GetCustomVersions

(
    FArchive& InlineArchive
)

Get the CustomVersions used in the file containing the BulkData payload.

Public function Const

FName

 

GetDecompressionFormat()

Returns flags usable to decompress the bulk data

Public function Static

FName

 

GetDecompressionFormat

(
    EBulkDataFlags InFlags
)

Returns decompress method flags specified by the given bulk data flags.

Public function Const

int64

 

GetElementCount()

Returns the number of elements in this bulk data array.

Public function Const

int32

 

GetElementSize()

Returns size in bytes of single element.

Public function Const

FIoFilenameH...

 

GetIoFilenameHash()

Returns the io filename hash associated with this bulk data.

Public function Const

const FPacka...

 

GetPackagePath()

Returns the PackagePath this bulkdata resides in

Public function Const

EPackageSegm...

 

GetPackageSegment()

Returns which segment of its PackagePath this bulkdata resides in

Public function Const

bool

 

IsAsyncLoadingComplete()

Returns whether the bulk data asynchronous load has completed.

Public function Const

bool

 

IsAvailableForUse()

Returns whether this bulk data is used

Public function Const

bool

 

IsBulkDataLoaded()

Returns whether the bulk data is currently loaded and resident in memory.

Public function Const

bool

 

IsInExternalResource()

Returns whether this bulk data is stored in a PackageExternalResource rather than in a neighboring segment of its owner's PackagePath.

Public function Const

bool

 

IsInlined()

Returns whether this bulk data is currently stored inline or not

Public function Const

bool

 

IsInSeparateFile()

Returns whether this bulk data is currently stored in it's own file or not

Public function Const

bool

 

IsLocked()

Checks if this bulk is locked

Public function Const

bool

 

IsOptional()

Returns whether this bulk data represents optional data or not

Public function Const

bool

 

IsStoredCompressedOnDisk()

Returns whether the bulk data is stored compressed on disk.

Public function Const

bool

 

IsUsingIODispatcher()

Returns whether this bulk data is accessed via the IoDispatcher or not.

Public function

bool

 

LoadBulkDataWithFileReader()

Load the bulk data using a file reader.

Public function

void *

 

Lock

(
    uint32 LockFlags
)

Locks the bulk data and returns a pointer to it.

Public function Const

const void &...

 

LockReadOnly()

Locks the bulk data and returns a read-only pointer to it.

Public function Const

IAsyncReadFi...

 

OpenAsyncReadHandle()

Opens a new IAsyncReadFileHandle that references the file that the BulkData object represents.

Public function

void *

 

Realloc

(
    int64 InElementCount
)

Change size of locked bulk data. Only valid if locked via read-write lock.

Public function

void

 

RemoveBulkData()

Clears/removes any currently allocated data payload and resets element count to 0.

Protected function Virtual

bool

 

RequiresSingleElementSerialization

(
    FArchive& Ar
)

Returns whether single element serialization is required given an archive.

Public function

void

 

ResetBulkDataFlags

(
    uint32 BulkDataFlagsToSet
)

Enable the given flags and disable all other flags.

Public function

void

 

Serialize

(
    FArchive& Ar,
    UObject* Owner,
    int32 Idx,
    bool bAttemptFileMapping,
    EFileRegionType FileRegionType
)

Serialize function used to serialize this bulk data structure.

Public function

void

 

SerializeBulkData

(
    FArchive& Ar,
    void* Data,
    EBulkDataFlags InBulkDataFlags
)

Serialize just the bulk data portion to/ from the passed in memory.

Protected function

void

 

SerializeElement

(
    FArchive& Ar,
    void* Data,
    int64 ElementIndex
)

Serializes a single element at a time, allowing backward compatible serialization and endian swapping to be performed.

Protected function Virtual

void

 

SerializeElements

(
    FArchive& Ar,
    void* Data
)

Serializes all elements, a single element at a time, allowing backward compatible serialization and endian swapping to be performed.

Public function

void

 

SetBulkDataAlignment

(
    uint16 BulkDataAlignmentToSet
)

Sets the passed in bulk data alignment.

Public function

void

 

SetBulkDataFlags

(
    uint32 BulkDataFlagsToSet
)

Enables the given flags without affecting any previously set flags.

Public function Static

void

 

SetBulkDataFlagsOn

(
    EBulkDataFlags& InOutAccumulator,
    EBulkDataFlags FlagsToSet
)

Enable the given flags in the given accumulator variable.

Public function

void

 

SetFlagsFromDiskWrittenValues

(
    EBulkDataFlags InBulkDataFlags,
    int64 InBulkDataOffsetInFile,
    int64 InBulkDataSizeOnDisk,
    int64 LinkerSummaryBulkDataStartOff...
)

When saving BulkData, if we are overwriting the file we need to update the BulkData's (flags,offset,size) to be able to load from the new file.

Public function

bool

 

StartAsyncLoading()

Initiates a new asynchronous operation to load the dulkdata from disk assuming that it is not already loaded.

Public function

FOwnedBulkDa...

 

StealFileMapping()

Public function

bool

 

UnloadBulkData()

Deallocates bulk data without detaching the archive, so that further bulk data accesses require a reload.

Public function Const

void

 

Unlock()

Unlocks bulk data after which point the pointer returned by Lock no longer is valid.

Operators

Name Description

Public function

FUntypedBulk...

 

operator=

(
    const FUntypedBulkData& Other
)

Copies the source array into this one after detaching from archive.

Typedefs

Name

Description

BulkDataRangeArray

Deprecated Functions

Name Description

Public function Static

IBulkDataIOR...

 

CreateStreamingRequestForRange

(
    const FString& Filename,
    const BulkDataRangeArray& RangeArr...,
    EAsyncIOPriorityAndFlags Priority,
    FBulkDataIORequestCallBack* Co...
)

Use version that takes a FPackagePath instead

Public function Const

FString

 

GetFilename()

Use GetPackagePath instead

Public function Const

bool

 

InSeperateFile()

Use ::IsInSeparateFile() instead

Public function

void

 

SerializeBulkData

(
    FArchive& Ar,
    void* Data
)

Use the version that takes InBulkDataFlags

Public function

void

 

StoreCompressedOnDisk

(
    FName CompressionFormat
)

Use the FName version of StoreCompressedOnDisk

Public function

void

 

StoreCompressedOnDisk

(
    ECompressionFlags CompressionFlags
)

Use the FName version of StoreCompressedOnDisk