Closed plus1pixel closed 3 years ago
Ok ive figured it out myself (-;
For those who wonder how to do it - i cheated :p There are 2 helper functions to switch visibilty of widget in MoviePlayer.cpp, so i just slightly modified them and added to slate widget template files of this plugin.
EVisibility SClassicLayout::GetWidgetVisibility() const { return (!GetMoviePlayer()->IsMovieCurrentlyPlaying() && !GetMoviePlayer()->IsLoadingFinished()) ? EVisibility::Visible : EVisibility::Collapsed; }
and then call it somewhere (just like they do in MoviePlayer.cpp for SLoadingScreenTestWidget) to hide widget or its part or w/e
.Visibility(this, &SClassicLayout::GetWidgetVisibility)
So basicly widget is allways there but stays hidden till movies being played. This can be improved further as there are alot of functions avaliable for MoviePlayer (check MoviePlayer.h it's well commented) aswell as logic could be ran using plugin options variables.
Technically, proper way to do it is to make delegate for GetMoviePlayer()->OnMoviePlaybackFinished()
GetMoviePlayer()->OnMoviePlaybackFinished().AddRaw(this, &FLoadingScreenModule::HandleMoviePlaybackFinished);
and then try to push widgets shared pointer that was created on a startup in it like this
GetMoviePlayer()->SetSlateOverlayWidget(SplashScreenWidget);
You can find how to do it in another fork of LoadingScreen plugin by OldSiren... but that results crash ive mentioned in first post on 4.25.
I guess its a feature request as i cant seem to find that kind of option. What i want is to play couple short movies on startup (UE logo, studio logo) followed with slate loading widget. I have tried to do it on my own but it throws me and error that i must operate with slate only in slate thread.... assertion failed and yada yada :(