├── .gitignore ├── LICENSE ├── README.md ├── Source └── SplashSettings │ ├── Private │ └── SplashSettings.cpp │ ├── Public │ └── SplashSettings.h │ └── SplashSettings.Build.cs └── SplashSettings.uplugin /.gitignore: -------------------------------------------------------------------------------- 1 | Binaries 2 | Intermediate -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Project Borealis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SplashSettings 2 | 3 | Customize Unreal Engine splash on startup with a random splash image 4 | 5 | ## Usage 6 | 7 | Add this to your plugins folder. It will search in `Content/Splash` for splash images (`EdSplash*` for editor, `Splash*` for game). 8 | png, jpg and bmp are supported splash image types. 9 | 10 | Note: Remember to add `Splash` to "Additional Non-Asset Directories To Copy" in Project Packaging Settings. 11 | -------------------------------------------------------------------------------- /Source/SplashSettings/Private/SplashSettings.cpp: -------------------------------------------------------------------------------- 1 | #include "SplashSettings.h" 2 | 3 | #include "CoreGlobals.h" 4 | #include "GenericPlatform/GenericPlatformSplash.h" 5 | #include "HAL/FileManager.h" 6 | #include "Misc/Paths.h" 7 | 8 | void FSplashSettingsModule::StartupModule() 9 | { 10 | const FString& SplashDirectory = FPaths::ConvertRelativePathToFull(FPaths::ProjectContentDir() / TEXT("Splash")); 11 | TArray AllSplashFiles; 12 | IFileManager::Get().FindFiles(AllSplashFiles, *(SplashDirectory / TEXT("*.png")), true, false); 13 | IFileManager::Get().FindFiles(AllSplashFiles, *(SplashDirectory / TEXT("*.jpg")), true, false); 14 | IFileManager::Get().FindFiles(AllSplashFiles, *(SplashDirectory / TEXT("*.bmp")), true, false); 15 | 16 | const TArray& SplashFiles = AllSplashFiles.FilterByPredicate([&](const FString& File) { 17 | #if WITH_EDITOR 18 | return File.StartsWith(TEXT("EdSplash")); 19 | #else 20 | return File.StartsWith(TEXT("Splash")); 21 | #endif 22 | }); 23 | 24 | const TArray::SizeType& Num = SplashFiles.Num(); 25 | 26 | if (Num > 0) 27 | { 28 | FGenericPlatformSplash::SetCustomSplashImage(*(SplashDirectory / SplashFiles[FMath::RandRange(0, Num - 1)])); 29 | } 30 | } 31 | 32 | IMPLEMENT_MODULE(FSplashSettingsModule, SplashSettings) 33 | -------------------------------------------------------------------------------- /Source/SplashSettings/Public/SplashSettings.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Modules/ModuleManager.h" 7 | 8 | class FSplashSettingsModule : public IModuleInterface 9 | { 10 | public: 11 | /** IModuleInterface implementation */ 12 | virtual void StartupModule() override; 13 | }; 14 | -------------------------------------------------------------------------------- /Source/SplashSettings/SplashSettings.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | namespace UnrealBuildTool.Rules 4 | { 5 | public class SplashSettings : ModuleRules 6 | { 7 | public SplashSettings(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PrivateDependencyModuleNames.AddRange( 12 | new string[] 13 | { 14 | "Core", 15 | "CoreUObject", 16 | "Engine", 17 | "ApplicationCore", 18 | } 19 | ); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SplashSettings.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "1.0", 5 | "FriendlyName": "Splash Settings", 6 | "Description": " Customize splash on startup with a random splash image", 7 | "Category": "Widgets", 8 | "CreatedBy": "Project Borealis", 9 | "CreatedByURL": "https://projectborealis.com/", 10 | "DocsURL": "https://github.com/ProjectBorealis/SplashSettings/blob/main/README.md", 11 | "MarketplaceURL": "", 12 | "SupportURL": "https://github.com/ProjectBorealis/SplashSettings/issues", 13 | "CanContainContent": false, 14 | "IsBetaVersion": false, 15 | "Installed": false, 16 | "EnabledByDefault": true, 17 | "Modules": [ 18 | { 19 | "Name": "SplashSettings", 20 | "Type": "Runtime", 21 | "LoadingPhase": "PostConfigInit" 22 | } 23 | ] 24 | } 25 | --------------------------------------------------------------------------------