Custom Splash screen is not displayed at launch

Oh I dunno, I’m mostly speaking to the part about the “division”.

I am sure you should be entering a relative path as the splash screen path though. If you don’t then how would your splash screen image be found on any computer but your own. “V:/UE4Projects/Exil” only exists on your computer, and certainly doesn’t exist on a Mac, or linux machine, and definitely wouldn’t be where someone is going to install your game if you release it.

FPlatformProcess:BaseDir() is supposed to be providing the platform specific portion of your project path. Combining that with your platform relative path: “Splash/Splash.bmp” is the right direction to go in. Otherwise nothing you do will work on any ones computer except your own.

1 Like

Sorry Fryok, I thought you were saying that you had entered a hardcoded path in your editor project settings.

Hi,

I was looking today in a way to display my custom Splash screen when launching the editor/game with my own project. However I noticed that as soon I added my custom bitmap files, they totally disabled the splash screen.

I spent a bit of time digging in the source code (I’m working with the GitHub version, UE4 4.2.1) and found the problem. I checked first and the path to my splash screen was fine and the file was existing. (In my project settings under the editor the files also appear properly.)

In WindowsPlatformSplash.cpp around the line 680 :

GSplashScreenFileName = FString( FPlatformProcess::BaseDir() ) / SplashPath;

This line was the problem, I changed it to the following to fix it :

GSplashScreenFileName = SplashPath;

The original code was producing a file path like this :

C:/GitHub/UnrealEngine/Engine/Binaries/Win64/V:/UE4Projects/Exil/Content/Splash/Splash.bmp

As you can see my game project is not on the same drive as the engine and the final path is totally incorrect.
Any reason to “divide” the file path with FString( FPlatformProcess::BaseDir() ) ? I don’t understand the purpose of this operation.

The “division” is an operator on FString that inserts a directory separator, which is different for each platform. BaseDir() should probably be GameDir() or maybe it’s ContentDir () I forget.

Are you sure ? Since I’m inside the Windows part of the splash screen code, it should be dedicated to it like the rest of the other functions. Mac has a totally different set of files for example. But even in that case, the SplashPath variable still contains the absolute path to the file, I don’t see why it should be modified.

Of course the absolute path is generated on the fly, not hardcoded. What you see in my message above is a log output, not the code. Take a look inside GetSplashPath() in WindowsPlatformSplash.cpp you will see the use of FPaths::GameContentDir() to generated it (and it gives an absolute path, not a relative one).

My modification also work with the default splash screen that is located in the Engine/Content folder of UE4. That’s why I’m curious about the operation.

Hi ,

Thank you for the information that you provided. I did some testing on this issue and was able to see the results that you described. I have submitted a report about this issue to the development team for further investigation.

Thanks,

1 Like

Hi ,

We have a fix for this now, which is currently going through our internal testing process – so won’t be available publicly until perhaps next week (I’ll post when it is).

In the meantime, I’ve attached a diff of the changes you’ll need to implement to get it working correctly (although your workaround is fine too).

Please let us know if you have any further issues, thanks.

Andrew

Hi ,

The change is now available:
https://github.com/EpicGames/UnrealEngine/commit/a74a41dd093b4338bd98848051f3c6481db146de

Thanks again for bringing this to our attention.

Andrew

1 Like

Did that make into UE 5.1.1? I still have the issue described by the original poster.