Files
UnrealEngine/Engine/Plugins/Mutable/Source/CustomizableObject/Private/MuCO/MutableStreamableManager.cpp
2025-05-18 13:04:45 +08:00

30 lines
731 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MuCO/MutableStreamableManager.h"
int32 FMutableStreamableManager::Tick(bool bBlocking)
{
if (bBlocking)
{
for (const TSharedRef<FMutableStreamableHandle>& MutableStreamableHandle : StreamableHandles)
{
if (!MutableStreamableHandle->bCompleted)
{
TArray<FSoftObjectPath> RequestedAssets;
MutableStreamableHandle->Handle->GetRequestedAssets(RequestedAssets);
FCookLoadScope CookLoadScope(ECookLoadType::EditorOnly);
StreamableManager.RequestSyncLoad(RequestedAssets);
MutableStreamableHandle->Delegate.ExecuteIfBound();
MutableStreamableHandle->Handle->CancelHandle();
}
}
StreamableHandles.Empty();
}
return 0;
}