You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
[FYI] james.doverspike Original CL Desc ----------------------------------------------------------------- Cosmetic bulk asset streaming Adds support for marking skeletal meshes and textures as optional files that stream from the cloud, typically used for cosmetics. Meshes and textures will now upload all of their non-inlined LODs as optional bulk files to the cloud, removing them from the pak files. The client will download into the VirtualFileCache in PersistentDownloadDir/VFC, which evicts least recently used LODs. These assets will have a longer delay to update to the higher quality LOD when their LODs are not in cache because they are now downloaded on-demand. [CL 24373261 by james doverspike in ue5-main branch]
116 lines
4.3 KiB
C++
116 lines
4.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "InstallBundleManagerInterface.h"
|
|
#include "InstallBundleManagerModule.h"
|
|
|
|
FInstallBundleManagerInitCompleteMultiDelegate IInstallBundleManager::InitCompleteDelegate;
|
|
|
|
FInstallBundleCompleteMultiDelegate IInstallBundleManager::InstallBundleCompleteDelegate;
|
|
|
|
FInstallBundlePausedMultiDelegate IInstallBundleManager::PausedBundleDelegate;
|
|
|
|
FInstallBundleReleasedMultiDelegate IInstallBundleManager::ReleasedDelegate;
|
|
|
|
FInstallBundleManagerOnPatchCheckComplete IInstallBundleManager::PatchCheckCompleteDelegate;
|
|
|
|
TSharedPtr<IInstallBundleManager> IInstallBundleManager::GetPlatformInstallBundleManager()
|
|
{
|
|
static IInstallBundleManagerModule* Module = nullptr;
|
|
static bool bCheckedIni = false;
|
|
|
|
if (Module)
|
|
{
|
|
return Module->GetInstallBundleManager();
|
|
}
|
|
|
|
if (!bCheckedIni && !GEngineIni.IsEmpty())
|
|
{
|
|
FString ModuleName;
|
|
#if WITH_EDITOR
|
|
GConfig->GetString(TEXT("InstallBundleManager"), TEXT("EditorModuleName"), ModuleName, GEngineIni);
|
|
#else
|
|
GConfig->GetString(TEXT("InstallBundleManager"), TEXT("ModuleName"), ModuleName, GEngineIni);
|
|
#endif // WITH_EDITOR
|
|
|
|
if (FModuleManager::Get().ModuleExists(*ModuleName))
|
|
{
|
|
Module = FModuleManager::LoadModulePtr<IInstallBundleManagerModule>(*ModuleName);
|
|
}
|
|
|
|
bCheckedIni = true;
|
|
}
|
|
|
|
if (Module)
|
|
{
|
|
return Module->GetInstallBundleManager();
|
|
}
|
|
|
|
return {};
|
|
}
|
|
|
|
TValueOrError<FInstallBundleRequestInfo, EInstallBundleResult> IInstallBundleManager::RequestUpdateContent(FName BundleName, EInstallBundleRequestFlags Flags, ELogVerbosity::Type LogVerbosityOverride /*= ELogVerbosity::NoLogging*/)
|
|
{
|
|
return RequestUpdateContent(MakeArrayView(&BundleName, 1), Flags, LogVerbosityOverride);
|
|
}
|
|
|
|
FDelegateHandle IInstallBundleManager::GetContentState(FName BundleName, EInstallBundleGetContentStateFlags Flags, bool bAddDependencies, FInstallBundleGetContentStateDelegate Callback, FName RequestTag /*= NAME_None*/)
|
|
{
|
|
return GetContentState(MakeArrayView(&BundleName, 1), Flags, bAddDependencies, MoveTemp(Callback), RequestTag);
|
|
}
|
|
|
|
FDelegateHandle IInstallBundleManager::GetInstallState(FName BundleName, bool bAddDependencies, FInstallBundleGetInstallStateDelegate Callback, FName RequestTag /*= NAME_None*/)
|
|
{
|
|
return GetInstallState(MakeArrayView(&BundleName, 1), bAddDependencies, MoveTemp(Callback), RequestTag);
|
|
}
|
|
|
|
TValueOrError<FInstallBundleCombinedInstallState, EInstallBundleResult> IInstallBundleManager::GetInstallStateSynchronous(FName BundleName, bool bAddDependencies) const
|
|
{
|
|
return GetInstallStateSynchronous(MakeArrayView(&BundleName, 1), bAddDependencies);
|
|
}
|
|
|
|
TValueOrError<FInstallBundleRequestInfo, EInstallBundleResult> IInstallBundleManager::RequestReleaseContent(FName ReleaseName, EInstallBundleReleaseRequestFlags Flags, TArrayView<const FName> KeepNames /*= TArrayView<const FName>()*/, ELogVerbosity::Type LogVerbosityOverride /*= ELogVerbosity::NoLogging*/)
|
|
{
|
|
return RequestReleaseContent(MakeArrayView(&ReleaseName, 1), Flags, KeepNames, LogVerbosityOverride);
|
|
}
|
|
|
|
EInstallBundleResult IInstallBundleManager::FlushCache(FInstallBundleManagerFlushCacheCompleteDelegate Callback, ELogVerbosity::Type LogVerbosityOverride /*= ELogVerbosity::NoLogging*/)
|
|
{
|
|
return FlushCache({}, MoveTemp(Callback), LogVerbosityOverride);
|
|
}
|
|
|
|
void IInstallBundleManager::RequestRemoveContentOnNextInit(FName RemoveName, TArrayView<const FName> KeepNames /*= TArrayView<const FName>()*/)
|
|
{
|
|
RequestRemoveContentOnNextInit(MakeArrayView(&RemoveName, 1), KeepNames);
|
|
}
|
|
|
|
void IInstallBundleManager::CancelRequestRemoveContentOnNextInit(FName BundleName)
|
|
{
|
|
CancelRequestRemoveContentOnNextInit(MakeArrayView(&BundleName, 1));
|
|
}
|
|
|
|
void IInstallBundleManager::CancelUpdateContent(FName BundleName)
|
|
{
|
|
CancelUpdateContent(MakeArrayView(&BundleName, 1));
|
|
}
|
|
|
|
void IInstallBundleManager::PauseUpdateContent(FName BundleName)
|
|
{
|
|
PauseUpdateContent(MakeArrayView(&BundleName, 1));
|
|
}
|
|
|
|
void IInstallBundleManager::ResumeUpdateContent(FName BundleName)
|
|
{
|
|
ResumeUpdateContent(MakeArrayView(&BundleName, 1));
|
|
}
|
|
|
|
void IInstallBundleManager::UpdateContentRequestFlags(FName BundleName, EInstallBundleRequestFlags AddFlags, EInstallBundleRequestFlags RemoveFlags)
|
|
{
|
|
UpdateContentRequestFlags(MakeArrayView(&BundleName, 1), AddFlags, RemoveFlags);
|
|
}
|
|
|
|
void IInstallBundleManager::StartPatchCheck()
|
|
{
|
|
PatchCheckCompleteDelegate.Broadcast(EInstallBundleManagerPatchCheckResult::NoPatchRequired);
|
|
}
|
|
|