mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 09:35:25 +00:00
Add function to force update streaming
This commit is contained in:
parent
5870e7b2fb
commit
39f9aefb68
@ -38,3 +38,13 @@ void UStevesBPL::AddViewOriginToStreaming(const FVector& ViewOrigin,
|
|||||||
Duration,
|
Duration,
|
||||||
ActorToBoost);
|
ActorToBoost);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UStevesBPL::UpdateStreaming(float DeltaTime, bool bBlockUntilDone)
|
||||||
|
{
|
||||||
|
FStreamingManagerCollection& SM = IStreamingManager::Get();
|
||||||
|
SM.UpdateResourceStreaming(DeltaTime, true);
|
||||||
|
if (bBlockUntilDone)
|
||||||
|
{
|
||||||
|
SM.BlockTillAllRequestsFinished();
|
||||||
|
}
|
||||||
|
}
|
@ -98,4 +98,12 @@ public:
|
|||||||
AActor* ActorToBoost = nullptr);
|
AActor* ActorToBoost = nullptr);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Force content streaming to update. Useful if you need things to stream in sooner than usual.
|
||||||
|
* @param DeltaTime The amount of time to tell the streaming system that has passed.
|
||||||
|
* @param bBlockUntilDone If true, this call will not return until the streaming system has updated
|
||||||
|
*/
|
||||||
|
UFUNCTION(BlueprintCallable, Category="StevesUEHelpers|Streaming")
|
||||||
|
static void UpdateStreaming(float DeltaTime, bool bBlockUntilDone = false);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user