Navigation
API > API/Plugins > API/Plugins/PlatformDLC
Generic platform DLC implementation - typical base class for platform specializations
| Name | FGenericPlatformDLC |
| Type | class |
| Header File | /Engine/Plugins/Experimental/PlatformDLC/Source/PlatformDLC/Public/PlatformDLC.h |
| Include Path | #include "PlatformDLC.h" |
Syntax
class FGenericPlatformDLC : public IPlatformDLC
Implements Interfaces
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| InitLock | FCriticalSection | PlatformDLC.h | ||
| InitState | std::atomic< EInitState > | PlatformDLC.h | ||
| NotificationDelegate | FOnDLCNotification | PlatformDLC.h | ||
| PendingInitCallbacks | TArray< TFunction< void()> > | PlatformDLC.h |
Functions
Public Virtual
Overridden from IPlatformDLC
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Download
(
FName DLCName |
Start asynchronously downloading the given DLC. | PlatformDLC.h | |
virtual TArray< FName > GetAllDLCNames() |
Returns the list of all known DLC (regardless of whether downloaded / mounted) | PlatformDLC.h | |
virtual bool GetDownloadSize
(
FName DLCName, |
Determine the download size for the given DLC returns true if the download size is available | PlatformDLC.h | |
virtual TArray< FName > GetMountedDLCNames() |
Returns the list of all DLC that is ready for use (entitled, downloaded & mounted) | PlatformDLC.h | |
virtual FString GetRootDirectory
(
FName DLCName |
Returns the file system mount point for the given DLC | PlatformDLC.h | |
virtual EState GetState
(
FName DLCName |
Returns the current state of the given DLC | PlatformDLC.h | |
virtual FString GetStoreId
(
FName DLCName |
Get the store id for the DLC (should be convertible to FUniqueOfferId) | PlatformDLC.h | |
virtual FPlatformUserId GetStoreUser() |
Returns the user who will be used to purchase any DLC, if any | PlatformDLC.h | |
virtual bool HasEntitlement
(
FName DLCName |
Query if we have entitlement to download & mount the given DLC | PlatformDLC.h | |
virtual bool InitializeAsync() |
Start initializing the platform DLC; subsequent calls after the first are ignored; returns true if initialization was started | PlatformDLC.h | |
virtual bool IsAvailable () |
Returns true if DLC is supported in the current build configuration. | PlatformDLC.h | |
virtual bool IsInitialized() |
Determines whether the platform DLC has finished initializing | PlatformDLC.h | |
virtual bool Mount
(
FName DLCName |
Start asynchronously mounting the given DLC can also be used to attempt entitlement reacquisition after it has been lost returns true if the callback will be triggered, or false if the DLC is not known | PlatformDLC.h | |
virtual FOnDLCNotification & OnNotification() |
Called when there is a notification about DLC, such as mounting completion | PlatformDLC.h | |
virtual void RegisterInitializationCallback
(
TFunction< void()> Callback |
Register a callback for when initialization is complete; the callback will still occur if the DLC is already initialized | PlatformDLC.h | |
virtual void SetStoreUser
(
FPlatformUserId PlatformUserId |
Set the user who will be used to purchase any DLC | PlatformDLC.h | |
virtual void Shutdown() |
Shutdown the platform DLC and clean up resources | PlatformDLC.h | |
virtual bool Uninstall
(
FName DLCName |
Start uninstalling the given DLC (may not work properly on all platforms. DLC must be unmounted first) returns true if the callback will be triggered, or false if the DLC is not known | PlatformDLC.h | |
virtual bool Unmount
(
FName DLCName |
Start asynchronously unmounting the given DLC. | PlatformDLC.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void EndInitializeInternal() |
PlatformDLC.h | ||
bool IsInitializing() |
PlatformDLC.h | ||
void PostNotification
(
FName DLCName, |
PlatformDLC.h |
Protected Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginInitializeInternal() |
Override to perform platform-specific initialization on any thread and call EndInitializeInternal() when finished | PlatformDLC.h |