// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action. #pragma once #include "Engine/StreamableManager.h" DECLARE_LOG_CATEGORY_EXTERN(LogOLSAssetManagerStartupJob, Verbose, All); DECLARE_DELEGATE_OneParam(FOLSAssetManagerStartupJobSubstepProgress, float /*newProgress*/); /** Handles reporting progress from streamable handles */ struct FOLSAssetManagerStartupJob { FOLSAssetManagerStartupJobSubstepProgress SubstepProgressDelegate; TFunction&)> JobFunc; FString JobName; float JobWeight; mutable double LastUpdate = 0; /** Simple job that is all synchronous */ FOLSAssetManagerStartupJob(const FString& jobName, const TFunction&)>& jobFunc, float jobWeight) : JobFunc(jobFunc) , JobName(jobName) , JobWeight(jobWeight) {} /** Perform actual loading, will return a handle if it created one */ TSharedPtr DoJob() const; void UpdateSubstepProgress(float newProgress) const; void UpdateSubstepProgressFromStreamable(TSharedRef streamableHandle) const; };