UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BundlePrereqCombinedStatusHelper.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "Containers/Array.h"
6#include "Containers/Map.h"
7#include "Containers/Ticker.h"
8#include "CoreMinimal.h"
9#include "HAL/Platform.h"
11#include "InstallBundleTypes.h"
12//#include "InstallBundleUtils.h"
15
16class FName;
21
22//Handles calculating the bundle status by combining progress from all of its
23//Prerequisites. Allows you to display one progress percent that is weighted based on all
24//bundles' values.
26{
27public:
28
29 //Collapses all the bundle manager states into one of a few states so that you can show simple text based on this enum
31 {
32 Unknown,
34 Updating,
35 Finishing,
37 Count
38 };
39
40 //provide all our needed combined status information in 1 struct
55
56public:
60
63
66
67 //Setup tracking for all bundles required in the supplied BundleContentState
69
70 //Get current CombinedBundleStatus for everything setup to track
72
73 //Useful for resolving tick order issue
74 void ForceTick() { Tick(0); }
75
76private:
78 INSTALLBUNDLEMANAGER_API void UpdateBundleCache();
79 INSTALLBUNDLEMANAGER_API void UpdateCombinedStatus();
80
81 INSTALLBUNDLEMANAGER_API void SetupDelegates(bool bAutoTick);
82 INSTALLBUNDLEMANAGER_API void CleanUpDelegates();
83
84 //Called so we can track when a bundle is finished
86 INSTALLBUNDLEMANAGER_API void OnBundleInstallPauseChanged(FInstallBundlePauseInfo PauseInfo);
87
88 INSTALLBUNDLEMANAGER_API void UpdateCombinedProgress();
89
90private:
91 //All bundles we need including pre-reqs
92 TArray<FName> RequiredBundleNames;
93
94 //Internal Cache of all bundle statuses to track progress
96
97 //Bundle weights that determine what % of the overall install each bundle represents
98 TMap<FName, float> CachedBundleWeights;
99
100 FCombinedProgress CurrentCombinedProgress;
101
104 TUniqueFunction<void(const FCombinedProgress&)> OnTick;
105};
106
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
INSTALLBUNDLEMANAGER_API const TCHAR * LexToString(FInstallBundleCombinedProgressTracker::ECombinedBundleStatus Status)
Definition BundlePrereqCombinedStatusHelper.cpp:10
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EInstallBundlePauseFlags
Definition InstallBundleTypes.h:279
Definition BundlePrereqCombinedStatusHelper.h:26
ECombinedBundleStatus
Definition BundlePrereqCombinedStatusHelper.h:31
INSTALLBUNDLEMANAGER_API FInstallBundleCombinedProgressTracker & operator=(const FInstallBundleCombinedProgressTracker &Other)
Definition BundlePrereqCombinedStatusHelper.cpp:47
void ForceTick()
Definition BundlePrereqCombinedStatusHelper.h:74
INSTALLBUNDLEMANAGER_API void SetBundlesToTrackFromContentState(const FInstallBundleCombinedContentState &BundleContentState, TArrayView< FName > BundlesToTrack)
Definition BundlePrereqCombinedStatusHelper.cpp:111
INSTALLBUNDLEMANAGER_API ~FInstallBundleCombinedProgressTracker()
Definition BundlePrereqCombinedStatusHelper.cpp:32
INSTALLBUNDLEMANAGER_API const FCombinedProgress & GetCurrentCombinedProgress() const
Definition BundlePrereqCombinedStatusHelper.cpp:351
Definition NameTypes.h:617
Definition InstallBundleManagerInterface.h:126
Definition InstallBundleManager.Build.cs:6
Definition ArrayView.h:139
Definition Array.h:670
Definition UnrealString.h.inl:34
Definition FunctionFwd.h:19
Definition SharedPointer.h:1295
Definition InstallBundleTypes.h:163
Definition BundlePrereqCombinedStatusHelper.h:42
float InstallOnlyProgressPercent
Definition BundlePrereqCombinedStatusHelper.h:44
bool bIsPaused
Definition BundlePrereqCombinedStatusHelper.h:51
bool bDoesCurrentStateSupportPausing
Definition BundlePrereqCombinedStatusHelper.h:52
float BackgroundDownloadProgressPercent
Definition BundlePrereqCombinedStatusHelper.h:43
bool bBundleRequiresUpdate
Definition BundlePrereqCombinedStatusHelper.h:53
int32 TotalBundlesCount
Definition BundlePrereqCombinedStatusHelper.h:47
TArray< FBuildInstallerStat > Stats
Definition BundlePrereqCombinedStatusHelper.h:48
int32 InstalledBundlesCount
Definition BundlePrereqCombinedStatusHelper.h:46
ECombinedBundleStatus CombinedStatus
Definition BundlePrereqCombinedStatusHelper.h:49
float ProgressPercent
Definition BundlePrereqCombinedStatusHelper.h:45
EInstallBundlePauseFlags CombinedPauseFlags
Definition BundlePrereqCombinedStatusHelper.h:50
Definition InstallBundleManagerInterface.h:82
Definition InstallBundleManagerInterface.h:32
Definition InstallBundleManagerInterface.h:49