4.26 not properly loading materials on PreLoadingScreen phase

My project had a material that loaded fine on the LoadingScreen module from the ActionRPG template using 4.24.3 when called on StartupModule. After i migrated the project to 4.26 the material no longer works when creating the loadingscreen on startup, but works fine on any other moment.

Did 4.26 restrict the use of materials on that phase? if I try loading a texture it works as expected, problem is only with materials (i want to use a material with UV animation).

Hi KhalimWu,

The issue comes from the way “Time” is initialized in materials, it is done when the viewport is drawn for the first time.

If you have a StartupMovie then FDefaultGameMoviePlayer::WaitForMovieToFinish won’t go in the “else” code path that calls GameEngine->SwitchGameWindowToUseGameViewport();. This is where the viewport is drawn for the first time and initialize everything correctly for materials.

An easy way to fix your first loading screen is to call GetMoviePlayer()->WaitForMovieToFinish(); right before your call to SetupLoadingScreen

It worked like a charm for me :wink:

Cheers !

Thanks, I’ll test that!