IGameMoviePlayer playback of a movie during loading screen lets you set bAllowEngineTick = true as a parameter. This will make FDefaultGameMoviePlayer manually tick the engine:
if (GEngine && bAllowEngineTick && LoadingScreenAttributes.bAllowEngineTick) { GEngine->Tick(DeltaTime, false); }
However, it does not update the timestamp that is used to calculcate DeltaSeconds during normal ticking, which LaunchEngineLoop calls with
GEngine->UpdateTimeAndHandleMaxTickRate()
This results in a high value for FApp::GetDeltaTime() when the movie finishes playing and normal ticking resumes. FApp::GetDeltaTime() is used as delta seconds in FEngineLoop::Tick():
GEngine->Tick(FApp::GetDeltaTime(), bIdleMode);
So this leads to an incorrect DeltaSeconds for systems that have ticked in the meantime.
The fix may be to call GEngine->UpdateTimeAndHandleMaxTickRate() inside FDefaultGameMoviePlayer. However, perhaps more logic from FEngineLoop::Tick() should also be handled when playing a movie. Logging this task so someone can properly evaluate this.
void AMyPlayerController::Tick(float DeltaSeconds) { Super::Tick(DeltaSeconds); if (FApp::GetDeltaTime() > 5.0f) { UE_LOG(LogTemp, Error, TEXT("AAA | Long FApp::GetDeltaTime: %.2f"), float(FApp::GetDeltaTime())); } }
// Manually bring up loading screen FLoadingScreenAttributes LoadingScreen; LoadingScreen.bAutoCompleteWhenLoadingCompletes = false; LoadingScreen.WidgetLoadingScreen = FLoadingScreenAttributes::NewTestLoadingScreenWidget(); LoadingScreen.bAllowEngineTick = true; LoadingScreen.MoviePaths.Add("DummyMovie"); // Put a 10+ seconds long DummyMovie.mp4 in /Content/Movies LoadingScreen.bMoviesAreSkippable = false; GetMoviePlayer()->SetupLoadingScreen(LoadingScreen); GetMoviePlayer()->PlayMovie();
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Teleporter in the Creative Hub is Locked and cannot be accessed
Delay nodes occasionally don't fire the "Completed" output in a nativized build
How to achieve HLSL Multiple Render Target in Material blueprints?
What method is used to fill polygonal regions when drawing spline mesh at run time?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-207172 in the post.
0 |
Component | UE - Gameplay |
---|---|
Affects Versions | 5.1, 5.2, 5.3 |
Created | Feb 16, 2024 |
---|---|
Updated | Sep 4, 2024 |
12076 - m-grunwald |