Navigation
API > API/Plugins > API/Plugins/ChunkDownloader
Inheritance Hierarchy
- TSharedFromThis
- FChunkDownloader
References
| Module | ChunkDownloader |
| Header | /Engine/Plugins/Runtime/ChunkDownloader/Source/Public/ChunkDownloader.h |
| Include | #include "ChunkDownloader.h" |
Syntax
class FChunkDownloader : public TSharedFromThis< FChunkDownloader >
Variables
| Type | Name | Description | |
|---|---|---|---|
| FPlatformChunkInstallMultiDelegate | OnChunkMounted | Called whenever a chunk mounts (success or failure). ONLY USE THIS IF YOU WANT TO PASSIVELY LISTEN FOR MOUNTS (otherwise use the proper request callback on MountChunk) | |
| TFunction< void(const FString &FileName, const FString &Url, uint64 SizeBytes, const FTimespan &Down... | OnDownloadAnalytics | Called each time a download attempt finishes (success or failure). ONLY USE THIS IF YOU WANT TO PASSIVELY LISTEN. Downloads retry until successful. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | BeginLoadingMode
(
const FCallback& Callback |
Snapshot stats and enter into loading screen mode (pauses all background downloads). | |
| bool | CheckFileSha1Hash
(
const FString& FullPathOnDisk, |
||
| const TCHAR * | ChunkStatusToString
(
EChunkStatus Status |
Chunk status as logable string | |
| void | DownloadChunk
(
int32 ChunkId, |
Download all pak files in the chunk, but don't mount. | |
| void | DownloadChunks
(
const TArray< int32 >& ChunkIds, |
Download (Cache) all pak files in these chunks then fire the callback (convenience wrapper managing multiple DownloadChunk calls) | |
| void | |||
| void | Finalize () |
Unmount all chunks and cancel any downloads in progress (preserving partial downloads). | |
| int | FlushCache () |
Flush any cached files (on disk) that are not currently being downloaded to or mounting (does not unmount the corresponding pak files). | |
| TSharedPtr< FChunkDownloader > | Get () |
Static getters | |
| void | GetAllChunkIds
(
TArray< int32 >& OutChunkIds |
Return a list of all chunk IDs in the current manifest | |
| TSharedRef< FChunkDownloader > | GetChecked () |
Static getters | |
| EChunkStatus | GetChunkStatus
(
int32 ChunkId |
Get the current status of the specified chunk | |
| const FString & | Get the current content build ID | ||
| const FString & | Get the most recent deployment name | ||
| const FStats & | Get the current loading stats (generally only useful if you're in loading mode see BeginLoadingMode) | ||
| int32 | Get current number of download requests, so we know whether download is in progress. Downlading Requests will be removed from this array in it's FDownload::OnCompleted callback. | ||
| TSharedRef< FChunkDownloader > | GetOrCreate () |
Static getters | |
| void | Initialize
(
const FString& PlatformName, |
Initialize the download manager (populates the list of cached pak files from disk). Call only once. | |
| bool | LoadCachedBuild
(
const FString& DeploymentName |
Try to load a cached build ID from disk (good to do before updating build so it can possibly no-op) | |
| void | MountChunk
(
int32 ChunkId, |
Download all pak files, then asynchronously mount them in order (in order among themselves, async with game thread). | |
| void | MountChunks
(
const TArray< int32 >& ChunkIds, |
Download and mount all chunks then fire the callback (convenience wrapper managing multiple MountChunk calls) | |
| void | Shutdown () |
||
| void | UpdateBuild
(
const FString& DeploymentName, |
Set the the content build id if the content build id has changed, we pull the new BuildManifest from CDN and load it. | |
| int | Validate all fully cached files (blocking) by attempting to read them and check their Version hash. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FMultiCallback | |||
| FPakMountWork | |||
| FStats |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EChunkStatus |
Typedefs
| Name | Description |
|---|---|
| FCallback | |
| FMountTask |