UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
StreamableManager.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
10#include "Misc/SourceLocation.h"
12#include "Templates/Casts.h"
13#include "Templates/Function.h"
14#include "UObject/Class.h"
15#include "UObject/GCObject.h"
19
29
30
35
38
40{
41 // Default priority for all async loads
42 static constexpr TAsyncLoadPriority DefaultAsyncLoadPriority = 0;
43 // Priority to try and load immediately
44 static constexpr TAsyncLoadPriority AsyncLoadHighPriority = 100;
45
46 static constexpr FStreamableDownloadPriority DownloadVeryLowPriority = -200;
47 static constexpr FStreamableDownloadPriority DownloadLowPriority = -100;
48 static constexpr FStreamableDownloadPriority DownloadDefaultPriority = 0;
49 static constexpr FStreamableDownloadPriority DownloadHighPriority = 100;
50 static constexpr FStreamableDownloadPriority DownloadVeryHighPriority = 200;
51
53 {
54 if (InDelegate.IsBound())
55 {
56 return FStreamableDelegateWithHandle::CreateLambda(
58 {
59 // Delegates may get tick delayed so may not be safe to call if bound to a GC'd object
60 InDelegate.ExecuteIfBound();
61 });
62 }
63
65 }
66
68 {
69 if (InDelegate.IsBound())
70 {
71 return FStreamableDelegateWithHandle::CreateLambda(
73 {
74 // Delegates may get tick delayed so may not be safe to call if bound to a GC'd object
75 InDelegate.ExecuteIfBound();
76 });
77 }
78
80 }
81
82 template<class> inline constexpr bool always_false_v = false;
83
84 struct FDownloadContext;
85}
86
89{
92
93 template<typename DebugNameType = UE::FSourceLocation>
95 {
97 if constexpr (std::is_same_v<std::decay_t<DebugNameType>, UE::FSourceLocation>)
98 {
101 }
102 else
103 {
104 Result.ContentHandle = UE::IoStore::FOnDemandContentHandle::Create(
106 }
107
108 return Result;
109 }
110
111 ENGINE_API FString GetDebugName() const;
112
113 ENGINE_API void Release();
114 ENGINE_API bool IsValid() const;
115 operator bool() const { return IsValid(); }
117private:
120};
121
122#if WITH_EDITOR
123enum class ECookLoadType : uint8;
124#endif
125
128
130
138
140struct FStreamableHandleContextDataBase : public TSharedFromThis<FStreamableHandleContextDataBase, ESPMode::ThreadSafe>
141{
143 {
144 return InstanceTypeId;
145 }
146 template <typename SubClassType> bool IsType() const
147 {
148 return GetInstanceTypeId() == SubClassType::GetClassTypeId();
149 }
150
151protected:
153 : InstanceTypeId(TypeId)
154 {}
155
157
158private:
160};
161
166template <typename SubClassType>
168{
172
174 {
175 // Subclasses of TStreamableHandleContextData must implement
176 // MODULE_API static TStreamableHandleContextDataTypeIDStorage&
177 // TypeIdCrossModuleStorage() { static TStreamableHandleContextDataTypeIDStorage Id; return Id; }
178 // With MODULE_API being e.g. ENGINE_API.
179 // MODULE_API is required for classes used across modules, to ensure that all modules see the same value.
180 TStreamableHandleContextDataTypeIDStorage& ClassTypeId = SubClassType::TypeIdCrossModuleStorage();
182 {
184 }
185 return ClassTypeId.Value;
186 }
187};
188
190struct FStreamableHandle : public TSharedFromThis<FStreamableHandle>
191{
197 bool HasLoadCompleted() const
198 {
199 return bLoadCompleted;
200 }
201
203 bool WasCanceled() const
204 {
205 return bCanceled;
206 }
207
210 {
211 return !bLoadCompleted && !bCanceled;
212 }
213
215 bool IsActive() const
216 {
217 return !bCanceled && !bReleased;
218 }
219
221 bool IsStalled() const
222 {
223 return bStalled;
224 }
225
227 bool IsCombinedHandle() const
228 {
229 return bIsCombinedHandle;
230 }
231
233 bool HasError() const
234 {
235 return Error.IsSet();
236 }
237
240 {
241 return Error;
242 }
243
246 {
247 return DownloadCachePin;
248 }
249
252
255
257 ENGINE_API void SetDebugNameIfEmptyOrDefault(const FString& NewName);
258
260 const FString& GetDebugName() const
261 {
262 return DebugName;
263 }
264
265#if UE_WITH_PACKAGE_ACCESS_TRACKING
267 {
268 return ReferencerPackage;
269 }
271 {
272 return ReferencerPackageOp;
273 }
274#endif
275#if WITH_EDITOR
277 {
278 return CookLoadType;
279 }
280#endif
281
284 {
285 return Priority;
286 }
287
290
296
303
310
313
315 ENGINE_API bool HasCompleteDelegate() const;
316
318 ENGINE_API bool HasCancelDelegate() const;
319
321 ENGINE_API bool HasUpdateDelegate() const;
322
326
330
333
342
350
353
355 template<class T>
363
366
368 template<class T>
369 T* GetLoadedAsset() const
370 {
372 return Cast<T>(LoadedAsset);
373 }
374
376 ENGINE_API void GetLoadedCount(int32& LoadedCount, int32& RequestedCount) const;
377
383 template <typename CallableT>
384 void ForEachLoadedAsset(CallableT Callable) const;
385
388
391
394
397
400
411
422
432
442
450
456 template <typename T>
458 {
460 if (FoundInternally.IsValid())
461 {
462 return *FoundInternally.Get();
463 }
464
467
468 return *FreshlyAdded.Get();
469 }
470
476 template <typename T>
477 void AddContextData(const TSharedPtr<T>& NewData)
478 {
479 AdditionalContextData.Add(NewData);
480 }
481
488 template <typename T>
490 {
491 for (const TSharedPtr<FStreamableHandleContextDataBase>& InternalPtr : AdditionalContextData)
492 {
493 if (InternalPtr.IsValid() && InternalPtr->IsType<T>())
494 {
495 return StaticCastSharedPtr<T>(InternalPtr);
496 }
497 }
498
499 return nullptr;
500 }
501
507 template <typename T>
509 {
511
512 for (const TSharedPtr<FStreamableHandleContextDataBase>& InternalPtr : AdditionalContextData)
513 {
514 if (InternalPtr.IsValid() && InternalPtr->IsType<T>())
515 {
516 OfType.Add(StaticCastSharedPtr<T>(InternalPtr));
517 }
518 }
519
520 return OfType;
521 }
522
524private:
525 struct FPrivateToken { explicit FPrivateToken() = default; };
526 FStreamableHandle() = delete;
527public:
528 explicit FStreamableHandle(FPrivateToken, UE::FSourceLocation&& InLocation);
529
532
536
540 static ENGINE_API const FString HandleDebugName_Error;
541
542private:
543 friend struct FStreamableManager;
544 friend struct FStreamable;
546
548 bool IsHandleNameEmptyOrDefault() const;
549
551 void CompleteLoad();
552
554 void AsyncLoadCallbackWrapper(const FName& PackageName, UPackage* LevelPackage, EAsyncLoadingResult::Type Result, FSoftObjectPath TargetName);
555
557 void NotifyParentsOfCompletion();
558
560 void NotifyParentsOfCancellation();
561
563 void UpdateCombinedHandle();
564
566 void CallUpdateDelegate();
567
569 void UnbindDelegates();
570
572 void SetError(const UE::UnifiedError::FError& Error);
573 void SetErrorOnParents(const UE::UnifiedError::FError& Error);
574
576 FStreamableDelegateWithHandle CompleteDelegate;
577
579 FStreamableDelegateWithHandle CancelDelegate;
580
582 FStreamableUpdateDelegate UpdateDelegate;
583
585 FString DebugName;
586
588 UE::FSourceLocation Location;
589
592
594 FStreamableDownloadCachePin DownloadCachePin;
595
598
601
603 int32 StreamablesLoading;
604
606 int32 CompletedChildCount = 0;
607
609 int32 CanceledChildCount = 0;
610
612 TArray<FSoftObjectPath> RequestedAssets;
613
616
619
620#if UE_WITH_PACKAGE_ACCESS_TRACKING
623#endif
624
626 struct FStreamableManager* OwningManager;
627
630
631#if WITH_EDITOR
633#endif
634
636 bool bLoadStarted;
637
639 bool bLoadCompleted;
640
642 bool bReleased;
643
645 bool bCanceled;
646
648 bool bStalled;
649
651 bool bReleaseWhenLoaded;
652
654 bool bIsCombinedHandle;
655};
656
658{
659 None = 0,
661 MergeDebugNames = 0x01,
663 RedirectParents = 0x02,
665 SkipNulls = 0x04,
666};
667
669
672{
676 FStreamableDownloadPriority Priority = UE::StreamableManager::Private::DownloadDefaultPriority;
680 bool bDownloadOnly = false;
681};
682
703
706{
707 // Default priority for all async loads
708 static inline constexpr TAsyncLoadPriority DefaultAsyncLoadPriority = UE::StreamableManager::Private::DefaultAsyncLoadPriority;
709 // Priority to try and load immediately
710 static inline constexpr TAsyncLoadPriority AsyncLoadHighPriority = UE::StreamableManager::Private::AsyncLoadHighPriority;
711
712 static inline constexpr FStreamableDownloadPriority DownloadVeryLowPriority = UE::StreamableManager::Private::DownloadVeryLowPriority;
713 static inline constexpr FStreamableDownloadPriority DownloadLowPriority = UE::StreamableManager::Private::DownloadLowPriority;
714 static inline constexpr FStreamableDownloadPriority DownloadDefaultPriority = UE::StreamableManager::Private::DownloadDefaultPriority;
715 static inline constexpr FStreamableDownloadPriority DownloadHighPriority = UE::StreamableManager::Private::DownloadHighPriority;
716 static inline constexpr FStreamableDownloadPriority DownloadVeryHighPriority = UE::StreamableManager::Private::DownloadVeryHighPriority;
717
729 template< typename PathContainerType = TArray<FSoftObjectPath>, typename FuncType = FStreamableDelegateWithHandle, typename = std::enable_if_t<!std::is_same_v<std::decay_t<PathContainerType>, FStreamableAsyncLoadParams>, void> >
731 PathContainerType&& TargetsToStream,
734 bool bManageActiveHandle = false,
735 bool bStartStalled = false,
736 FString DebugName = FString(),
738
748 FString DebugName = FString(),
750
759 template< typename PathContainerType = TArray<FSoftObjectPath>>
761 PathContainerType&& TargetsToStream,
762 bool bManageActiveHandle = false,
763 FString DebugName = FString(),
765
775 const FSoftObjectPath& Target,
776 bool bManageActiveHandle = false,
779
781 template< typename T >
783 const FSoftObjectPath& Target,
784 bool bManageActiveHandle = false,
787 {
788 return Cast<T>(LoadSynchronous(Target, bManageActiveHandle, RequestHandlePointer, MoveTemp(Location)) );
789 }
790
791 template< typename T >
793 const TSoftObjectPtr<T>& Target,
794 bool bManageActiveHandle = false,
797 {
798 return Cast<T>(LoadSynchronous(Target.ToSoftObjectPath(), bManageActiveHandle, RequestHandlePointer, MoveTemp(Location)));
799 }
800
801 template< typename T >
803 const TSoftClassPtr<T>& Target,
804 bool bManageActiveHandle = false,
807 {
809 ReturnClass = Cast<UClass>(LoadSynchronous(Target.ToSoftObjectPath(), bManageActiveHandle, RequestHandlePointer, MoveTemp(Location)));
810 return ReturnClass;
811 }
812
829 );
830
846
856
859
861 ENGINE_API bool IsAsyncLoadComplete(const FSoftObjectPath& Target) const;
862
864 ENGINE_API void Unload(const FSoftObjectPath& Target);
865
868
870 ENGINE_API const FString& GetManagerName() const;
871
873 ENGINE_API void SetManagerName(FString InName);
874
876 ENGINE_API virtual void AddReferencedObjects(FReferenceCollector& Collector) override;
877 virtual FString GetReferencerName() const override { return ManagerName; }
878 ENGINE_API virtual bool GetReferencerPropertyName(UObject* Object, FString& OutPropertyName) const override;
879
882
886private:
887 friend FStreamableHandle;
889
890 void RemoveReferencedAsset(const FSoftObjectPath& Target, TSharedRef<FStreamableHandle> Handle);
891 void StartHandleRequests(TSharedRef<FStreamableHandle> Handle);
892 TArray<int32> GetAsyncLoadRequestIds(TSharedRef<FStreamableHandle> Handle);
893 void FindInMemory(FSoftObjectPath& InOutTarget, struct FStreamable* Existing, UPackage* Package = nullptr);
894 FSoftObjectPath HandleLoadedRedirector(UObjectRedirector* LoadedRedirector, FSoftObjectPath RequestedPath, struct FStreamable* RequestedStreamable);
895 struct FStreamable* FindStreamable(const FSoftObjectPath& Target) const;
897 ENGINE_API UObject* GetStreamed(const FSoftObjectPath& Target) const;
898 void CheckCompletedRequests(const FSoftObjectPath& Target, struct FStreamable* Existing);
899
900 void OnPreGarbageCollect();
902
903 ENGINE_API static bool ShouldStripDebugName();
904 ENGINE_API TSharedPtr<FStreamableHandle> RequestSyncLoadInternal(TArray<FSoftObjectPath>&& TargetsToStream, bool bManageActiveHandle, FString&& DebugName, UE::FSourceLocation&& Location);
905
908 TStreamableMap StreamableItems;
909
911 struct FRedirectedPath
912 {
914 FSoftObjectPath NewPath;
915
917 TObjectPtr<UObjectRedirector> LoadedRedirector;
918
919 FRedirectedPath() : LoadedRedirector(nullptr) {}
920 FRedirectedPath(const FSoftObjectPath& InNewPath, UObjectRedirector* InLoadedRedirector) : NewPath(InNewPath),LoadedRedirector(InLoadedRedirector) {}
921 };
922 typedef TMap<FSoftObjectPath, FRedirectedPath> TStreamableRedirects;
923 TStreamableRedirects StreamableRedirects;
924
926 TArray<TSharedRef<FStreamableHandle>> ManagedActiveHandles;
927
929 TArray<TSharedRef<FStreamableHandle>> PendingCombinedHandles;
930
932 bool bForceSynchronousLoads;
933
935 FString ManagerName;
936};
937
938template <typename CallableT>
940{
941 if (HasLoadCompleted())
942 {
943 for (const FSoftObjectPath& Ref : RequestedAssets)
944 {
945 // Try manager, should be faster and will handle redirects better
946 if (IsActive())
947 {
948 Invoke(Callable, OwningManager->GetStreamed(Ref));
949 }
950 else
951 {
952 Invoke(Callable, Ref.ResolveObject());
953 }
954 }
955
956 // Check child handles
957 for (const TSharedPtr<FStreamableHandle>& ChildHandle : ChildHandles)
958 {
959 for (const FSoftObjectPath& Ref : ChildHandle->RequestedAssets)
960 {
961 // Try manager, should be faster and will handle redirects better
962 if (IsActive())
963 {
964 Invoke(Callable, OwningManager->GetStreamed(Ref));
965 }
966 else
967 {
968 Invoke(Callable, Ref.ResolveObject());
969 }
970 }
971 }
972 }
973}
974
975template< typename PathContainerType, typename FuncType, typename >
977 PathContainerType&& TargetsToStream,
978 FuncType&& Callback,
980 bool bManageActiveHandle,
981 bool bStartStalled,
982 FString DebugName,
983 UE::FSourceLocation Location)
984{
986 Params.TargetsToStream = TArray<FSoftObjectPath>{ Forward<PathContainerType>(TargetsToStream) };
987
988 if constexpr (std::is_constructible_v<FStreamableDelegateWithHandle, FuncType>)
989 {
990 Params.OnComplete = FStreamableDelegateWithHandle(Forward<FuncType>(Callback));
991 }
992 else if constexpr (std::is_constructible_v<FStreamableDelegate, FuncType>)
993 {
996 }
997 else if constexpr (std::is_invocable_v<FuncType, TSharedPtr<FStreamableHandle>>)
998 {
999 Params.OnComplete = FStreamableDelegateWithHandle::CreateLambda(Forward<FuncType>(Callback));
1000 }
1001 else if constexpr (std::is_invocable_v<FuncType>)
1002 {
1004 FStreamableDelegate::CreateLambda(Forward<FuncType>(Callback)));
1005 }
1006 else
1007 {
1008 // Static assertions are evaluated even in non-instantiable static branches unless a dependent type is used. C++23 fixes this.
1009 static_assert(UE::StreamableManager::Private::always_false_v<FuncType>, "Cannot bind callback");
1010 }
1011
1012 Params.Priority = Priority;
1013 Params.bManageActiveHandle = bManageActiveHandle;
1014 Params.bStartStalled = bStartStalled;
1015
1016 return RequestAsyncLoad(
1017 MoveTemp(Params),
1018 MoveTemp(DebugName),
1019 MoveTemp(Location));
1020}
1021
1022template< typename PathContainerType>
1024 PathContainerType&& TargetsToStream,
1025 bool bManageActiveHandle,
1026 FString DebugName,
1027 UE::FSourceLocation Location)
1028{
1029 return RequestSyncLoadInternal(
1031 bManageActiveHandle,
1032 MoveTemp(DebugName),
1033 MoveTemp(Location));
1034}
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
ECookLoadType
Definition ICookInfo.h:53
FPlatformTypes::int16 int16
A 16-bit signed integer.
Definition Platform.h:1123
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
AUTORTFM_INFER UE_FORCEINLINE_HINT constexpr auto Invoke(FuncType &&Func, ArgTypes &&... Args) -> decltype(((FuncType &&) Func)((ArgTypes &&) Args...))
Definition Invoke.h:44
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
const bool
Definition NetworkReplayStreaming.h:178
uint8 TStreamableHandleContextDataTypeID
Definition StreamableManager.h:127
EStreamableManagerCombinedHandleOptions
Definition StreamableManager.h:658
EStreamableProgressType
Definition StreamableManager.h:21
@ TStreamableHandleContextDataTypeIDInvalid
Definition StreamableManager.h:129
TDelegate< void(TSharedPtr< struct FStreamableHandle >)> FStreamableDelegateWithHandle
Definition StreamableManager.h:33
int16 FStreamableDownloadPriority
Definition StreamableManager.h:37
TDelegate< void()> FStreamableDelegate
Definition StreamableManager.h:32
int32 TAsyncLoadPriority
Definition UObjectGlobals.h:726
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition GCObject.h:128
Definition NameTypes.h:617
Definition UObjectGlobals.h:2492
Definition Array.h:670
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
Definition AndroidPlatformMisc.h:14
Definition UnrealString.h.inl:34
Definition SharedPointer.h:1640
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition SoftObjectPtr.h:763
Definition SubclassOf.h:30
Definition UniquePtr.h:107
Definition SourceLocation.h:21
static UE_CONSTEVAL FSourceLocation Current(FSourceLocationImpl Impl=FSourceLocationImpl::current()) noexcept
Definition SourceLocation.h:107
Definition IoStoreOnDemand.h:88
static UE_API FOnDemandContentHandle Create()
Definition IoStoreOnDemandInternals.cpp:49
Definition UnifiedError.h:424
Definition ObjectRedirector.h:30
Definition Object.h:95
Definition Package.h:216
Type
Definition UObjectGlobals.h:694
Type
Definition UObjectGlobals.h:1141
FFileAndLineAdapter FileAndLine(const FSourceLocation &Location)
Definition SourceLocationUtils.h:159
Definition StreamableManager.h:40
FStreamableDelegateWithHandle WrapDelegate(const FStreamableDelegate &InDelegate)
Definition StreamableManager.h:52
constexpr bool always_false_v
Definition StreamableManager.h:82
Definition SoftObjectPath.h:56
Definition StreamableManager.h:685
TAsyncLoadPriority Priority
Definition StreamableManager.h:695
TArray< FSoftObjectPath > TargetsToStream
Definition StreamableManager.h:687
FStreamableDelegateWithHandle OnComplete
Definition StreamableManager.h:689
bool bStartStalled
Definition StreamableManager.h:699
TOptional< FStreamableDownloadParams > DownloadParams
Definition StreamableManager.h:701
FStreamableDelegateWithHandle OnCancel
Definition StreamableManager.h:691
FStreamableUpdateDelegate OnUpdate
Definition StreamableManager.h:693
bool bManageActiveHandle
Definition StreamableManager.h:697
Definition StreamableManager.h:89
ENGINE_API FString GetDebugName() const
Definition StreamableManager.cpp:89
ENGINE_API void Release()
Definition StreamableManager.cpp:90
ENGINE_API ~FStreamableDownloadCachePin()
static FStreamableDownloadCachePin Create(DebugNameType &&DebugNameOrLocation)
Definition StreamableManager.h:94
ENGINE_API bool IsValid() const
Definition StreamableManager.cpp:91
ENGINE_API FStreamableDownloadCachePin()
ENGINE_API bool operator==(FStreamableDownloadCachePin &Other) const
Definition StreamableManager.cpp:92
Definition StreamableManager.h:672
FStreamableDownloadCachePin CachePin
Definition StreamableManager.h:674
bool bInstallSoftReferences
Definition StreamableManager.h:678
bool bDownloadOnly
Definition StreamableManager.h:680
FStreamableDownloadPriority Priority
Definition StreamableManager.h:676
Definition StreamableManager.h:141
bool IsType() const
Definition StreamableManager.h:146
FStreamableHandleContextDataBase(TStreamableHandleContextDataTypeID TypeId)
Definition StreamableManager.h:152
TStreamableHandleContextDataTypeID GetInstanceTypeId() const
Definition StreamableManager.h:142
static ENGINE_API TStreamableHandleContextDataTypeID AllocateClassTypeId()
Definition StreamableManager.cpp:389
Definition StreamableManager.h:191
const FString & GetDebugName() const
Definition StreamableManager.h:260
TArray< TSharedPtr< T > > GetContextDataOfType() const
Definition StreamableManager.h:508
bool HasError() const
Definition StreamableManager.h:233
ENGINE_API void StartStalledHandle()
Definition StreamableManager.cpp:1039
static ENGINE_API const FString HandleDebugName_CombinedHandle
Definition StreamableManager.h:539
ENGINE_API TSharedPtr< FStreamableHandle > CreateCombinedHandle(const TConstArrayView< TSharedPtr< FStreamableHandle > > &OtherHandles)
Definition StreamableManager.cpp:1370
static ENGINE_API const FString HandleDebugName_Error
Definition StreamableManager.h:540
ENGINE_API bool BindCancelDelegate(FStreamableDelegateWithHandle NewDelegate)
Definition StreamableManager.cpp:594
TArray< FStreamableDownloadCachePin > GetDownloadCachePins() const
Definition StreamableManager.cpp:687
void GetLoadedAssets(TArray< T * > &LoadedAssets) const
Definition StreamableManager.h:356
ENGINE_API struct FStreamableManager * GetOwningManager() const
Definition StreamableManager.cpp:897
bool IsLoadingInProgress() const
Definition StreamableManager.h:209
const TOptional< UE::UnifiedError::FError > & GetError() const
Definition StreamableManager.h:239
FStreamableHandle & operator=(const FStreamableHandle &)=delete
ENGINE_API TSharedPtr< FStreamableHandle > GetOutermostHandle()
Definition StreamableManager.cpp:1388
ENGINE_API EAsyncPackageState::Type WaitUntilComplete(float Timeout=0.0f, bool bStartStalledHandles=true)
Definition StreamableManager.cpp:630
ENGINE_API TSharedPtr< FStreamableHandle > FindMatchingHandle(TFunction< bool(const FStreamableHandle &)> Predicate) const
Definition StreamableManager.cpp:1352
ENGINE_API void GetLoadedAssets(TArray< UObject * > &LoadedAssets) const
Definition StreamableManager.cpp:819
ENGINE_API TOptional< FStreamableDownloadPriority > GetDownloadPriority() const
Definition StreamableManager.cpp:761
ENGINE_API void SetDebugNameIfEmptyOrDefault(const FString &NewName)
Definition StreamableManager.cpp:753
ENGINE_API bool HasUpdateDelegate() const
Definition StreamableManager.cpp:1063
float GetRelativeDownloadProgress() const
Definition StreamableManager.h:393
bool IsStalled() const
Definition StreamableManager.h:221
FStreamableDownloadCachePin GetDownloadCachePin() const
Definition StreamableManager.h:245
FStreamableHandle(const FStreamableHandle &)=delete
ENGINE_API bool BindCompleteDelegate(FStreamableDelegateWithHandle NewDelegate)
Definition StreamableManager.cpp:570
ENGINE_API void CancelHandle()
Definition StreamableManager.cpp:908
ENGINE_API bool HasCompleteDelegate() const
Definition StreamableManager.cpp:1053
static ENGINE_API void ExecuteDelegate(const FStreamableDelegateWithHandle &Delegate, TSharedPtr< FStreamableHandle > AssociatedHandle=nullptr, const FStreamableDelegateWithHandle &CancelDelegate=FStreamableDelegateWithHandle())
Definition StreamableManager.cpp:1330
TAsyncLoadPriority GetPriority() const
Definition StreamableManager.h:283
ENGINE_API UObject * GetLoadedAsset() const
Definition StreamableManager.cpp:805
ENGINE_API void ReleaseHandle()
Definition StreamableManager.cpp:990
ENGINE_API float GetProgress(EStreamableProgressType Type=EStreamableProgressType::Load) const
Definition StreamableManager.cpp:845
TSharedPtr< T > FindFirstContextDataOfType() const
Definition StreamableManager.h:489
float GetAbsoluteDownloadProgress() const
Definition StreamableManager.h:396
void AddContextData(const TSharedPtr< T > &NewData)
Definition StreamableManager.h:477
static ENGINE_API const FString HandleDebugName_AssetList
Definition StreamableManager.h:538
ENGINE_API bool HasLoadCompletedOrStalled() const
Definition StreamableManager.cpp:711
ENGINE_API bool SetDownloadPriority(FStreamableDownloadPriority Priority)
Definition StreamableManager.cpp:771
static ENGINE_API const FString HandleDebugName_Preloading
Definition StreamableManager.h:537
void ForEachLoadedAsset(CallableT Callable) const
Definition StreamableManager.h:939
bool IsActive() const
Definition StreamableManager.h:215
ENGINE_API bool HasCancelDelegate() const
Definition StreamableManager.cpp:1058
T * GetLoadedAsset() const
Definition StreamableManager.h:369
bool HasLoadCompleted() const
Definition StreamableManager.h:197
float GetLoadProgress() const
Definition StreamableManager.h:390
bool IsCombinedHandle() const
Definition StreamableManager.h:227
ENGINE_API void GetLoadedCount(int32 &LoadedCount, int32 &RequestedCount) const
Definition StreamableManager.cpp:827
bool WasCanceled() const
Definition StreamableManager.h:203
ENGINE_API void GetRequestedAssets(TArray< FSoftObjectPath > &AssetList, bool bIncludeChildren=true) const
Definition StreamableManager.cpp:783
T & FindOrAddContextData()
Definition StreamableManager.h:457
ENGINE_API bool BindUpdateDelegate(FStreamableUpdateDelegate NewDelegate)
Definition StreamableManager.cpp:618
ENGINE_API ~FStreamableHandle()
Definition StreamableManager.cpp:1070
Definition StreamableManager.h:706
static constexpr FStreamableDownloadPriority DownloadHighPriority
Definition StreamableManager.h:715
FStreamableManager(const FStreamableManager &)=delete
ENGINE_API void SetManagerName(FString InName)
Definition StreamableManager.cpp:1600
static constexpr FStreamableDownloadPriority DownloadVeryLowPriority
Definition StreamableManager.h:712
ENGINE_API FSoftObjectPath ResolveRedirects(const FSoftObjectPath &Target) const
Definition StreamableManager.cpp:2548
FStreamableManager & operator=(const FStreamableManager &)=delete
TSubclassOf< T > LoadSynchronous(const TSoftClassPtr< T > &Target, bool bManageActiveHandle=false, TSharedPtr< FStreamableHandle > *RequestHandlePointer=nullptr, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition StreamableManager.h:802
static constexpr TAsyncLoadPriority AsyncLoadHighPriority
Definition StreamableManager.h:710
ENGINE_API TSharedPtr< FStreamableHandle > CreateErrorHandle(UE::UnifiedError::FError &&Error, FStreamableAsyncLoadParams &&Params, FString DebugName=FStreamableHandle::HandleDebugName_CombinedHandle, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition StreamableManager.cpp:2497
ENGINE_API bool AreAllAsyncLoadsComplete() const
Definition StreamableManager.cpp:2306
ENGINE_API UObject * LoadSynchronous(const FSoftObjectPath &Target, bool bManageActiveHandle=false, TSharedPtr< FStreamableHandle > *RequestHandlePointer=nullptr, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition StreamableManager.cpp:2056
ENGINE_API bool IsAsyncLoadComplete(const FSoftObjectPath &Target) const
Definition StreamableManager.cpp:2320
ENGINE_API TSharedPtr< FStreamableHandle > CreateCombinedHandle(TConstArrayView< TSharedPtr< FStreamableHandle > > ChildHandles, FString DebugName=FStreamableHandle::HandleDebugName_CombinedHandle, EStreamableManagerCombinedHandleOptions Options=EStreamableManagerCombinedHandleOptions::None, FStreamableAsyncLoadParams &&Params=FStreamableAsyncLoadParams{}, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition StreamableManager.cpp:2358
ENGINE_API ~FStreamableManager()
Definition StreamableManager.cpp:1526
TSharedPtr< FStreamableHandle > RequestSyncLoad(PathContainerType &&TargetsToStream, bool bManageActiveHandle=false, FString DebugName=FString(), UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition StreamableManager.h:1023
ENGINE_API bool GetActiveHandles(const FSoftObjectPath &Target, TArray< TSharedRef< FStreamableHandle > > &HandleList, bool bOnlyManagedHandles=false) const
Definition StreamableManager.cpp:2524
TSharedPtr< FStreamableHandle > RequestAsyncLoad(PathContainerType &&TargetsToStream, FuncType &&DelegateToCall=FStreamableDelegateWithHandle(), TAsyncLoadPriority Priority=DefaultAsyncLoadPriority, bool bManageActiveHandle=false, bool bStartStalled=false, FString DebugName=FString(), UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition StreamableManager.h:976
static constexpr FStreamableDownloadPriority DownloadDefaultPriority
Definition StreamableManager.h:714
virtual ENGINE_API bool GetReferencerPropertyName(UObject *Object, FString &OutPropertyName) const override
Definition StreamableManager.cpp:1605
T * LoadSynchronous(const FSoftObjectPath &Target, bool bManageActiveHandle=false, TSharedPtr< FStreamableHandle > *RequestHandlePointer=nullptr, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition StreamableManager.h:782
virtual FString GetReferencerName() const override
Definition StreamableManager.h:877
T * LoadSynchronous(const TSoftObjectPtr< T > &Target, bool bManageActiveHandle=false, TSharedPtr< FStreamableHandle > *RequestHandlePointer=nullptr, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition StreamableManager.h:792
static constexpr FStreamableDownloadPriority DownloadVeryHighPriority
Definition StreamableManager.h:716
ENGINE_API const FString & GetManagerName() const
Definition StreamableManager.cpp:1595
static constexpr TAsyncLoadPriority DefaultAsyncLoadPriority
Definition StreamableManager.h:708
ENGINE_API FStreamableManager()
Definition StreamableManager.cpp:1518
static constexpr FStreamableDownloadPriority DownloadLowPriority
Definition StreamableManager.h:713
virtual ENGINE_API void AddReferencedObjects(FReferenceCollector &Collector) override
Definition StreamableManager.cpp:1581
Definition StreamableManager.cpp:1438
Definition NumericLimits.h:41
Definition ObjectPtr.h:488
Definition Optional.h:131
constexpr bool IsSet() const
Definition Optional.h:69
Definition SoftObjectPtr.h:174
Definition StreamableManager.h:133
Definition StreamableManager.h:168
TStreamableHandleContextData()
Definition StreamableManager.h:169
static TStreamableHandleContextDataTypeID GetClassTypeId()
Definition StreamableManager.h:173
Definition StreamableManager.cpp:402