Skip to content

Commit 75e2328

Browse files
committed
Initial version, simple background image and a tip.
0 parents  commit 75e2328

15 files changed

+519
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Binaries/
2+
Intermediate/

Docs/plugins.png

43.3 KB
Loading

Docs/screenshot.png

27.8 KB
Loading

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 UE4 Plug-ins
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+

LoadingScreen.uplugin

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"FileVersion" : 3,
3+
"Version" : 1,
4+
"VersionName" : "1.0",
5+
"FriendlyName" : "Loading Screen",
6+
"Description" : "A simple loading screen plug-in.",
7+
"Category" : "Loading",
8+
"CreatedBy" : "Nick Darnell",
9+
"CreatedByURL": "http://nickdarnell.com",
10+
"EngineVersion" : "4.10.0",
11+
"EnabledByDefault" : false,
12+
"CanContainContent": true,
13+
14+
"Modules" :
15+
[
16+
{
17+
"Name" : "LoadingScreen",
18+
"Type" : "Runtime",
19+
"LoadingPhase" : "PreLoadingScreen"
20+
}
21+
]
22+
}

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# LoadingScreen
2+
3+
Unreal Engine 4 plug-in that adds a simple layer on top of the loading screen system.
4+
5+
![Screenshot](Docs/screenshot.png)
6+
7+
8+
## About
9+
10+
The LoadingScreen plug-in implements a module that allows you to configure a simple
11+
Loading Screen system in the engine. To goal is to make it more customizable over
12+
time to avoid needing to write a new loading screen manually.
13+
14+
15+
## Supported Platforms
16+
17+
This plug-in was last built against **Unreal Engine 4.11**. It works on all
18+
platforms.
19+
20+
21+
## Dependencies
22+
23+
This plug-in requires Visual Studio and either a C++ code project or a the full
24+
Unreal Engine 4 source code from GitHub. If you are new to programming in UE4,
25+
please see the official [Programming Guide](https://docs.unrealengine.com/latest/INT/Programming/index.html)!
26+
27+
28+
## Usage
29+
30+
You can use this plug-in as a project plug-in, or an Engine plug-in.
31+
32+
If you use it as a project plug-in, clone this repository into your project's
33+
*/Plugins* directory and compile your game in Visual Studio. A C++ code project
34+
is required for this to work.
35+
36+
If you use it as an Engine plug-in, clone this repository into the
37+
*/Engine/Plugins/Media* directory and compile your game. Full Unreal Engine 4
38+
source code from GitHub (4.9 or higher) is required for this.
39+
40+
After compiling the plug-in, you have to **enable it** in Unreal Editor's
41+
plug-in browser.
42+
43+
![plugin](Docs/plugin.png)
44+
45+
46+
## Support
47+
48+
Please [file an issue](https://github.com/nickdarnell/LoadingScreen/issues),
49+
submit a [pull request](https://github.com/nickdarnell/LoadingScreen/pulls?q=is%3Aopen+is%3Apr)
50+
or hit me up on twitter [@NickDarnell](https://twitter.com/NickDarnell)
51+
52+
53+
## References
54+
55+
* [Introduction to UE4 Plugins](https://wiki.unrealengine.com/An_Introduction_to_UE4_Plugins)

Resources/Icon128.png

4.21 KB
Loading
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
2+
3+
namespace UnrealBuildTool.Rules
4+
{
5+
public class LoadingScreen : ModuleRules
6+
{
7+
public LoadingScreen(TargetInfo Target)
8+
{
9+
PrivateIncludePaths.Add("LoadingScreen/Private");
10+
11+
PublicDependencyModuleNames.AddRange(
12+
new string[]
13+
{
14+
"Core",
15+
"CoreUObject",
16+
"MoviePlayer",
17+
"Slate",
18+
"SlateCore",
19+
"InputCore",
20+
"Engine"
21+
}
22+
);
23+
}
24+
}
25+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
2+
3+
#include "LoadingScreenPrivatePCH.h"
4+
#include "ILoadingScreenModule.h"
5+
6+
#include "LoadingScreenSettings.h"
7+
#include "MoviePlayer.h"
8+
9+
#include "SSimpleLoadingScreen.h"
10+
11+
#define LOCTEXT_NAMESPACE "LoadingScreen"
12+
13+
class FLoadingScreenModule : public ILoadingScreenModule
14+
{
15+
public:
16+
/** IModuleInterface implementation */
17+
virtual void StartupModule() override;
18+
virtual void ShutdownModule() override;
19+
virtual bool IsGameModule() const override
20+
{
21+
return true;
22+
}
23+
24+
private:
25+
void HandlePreLoadMap();
26+
void HandlePostLoadMap();
27+
28+
void BeginLoadingScreen(const FLoadingScreenDescription& ScreenDescription);
29+
void EndLoadingScreen();
30+
};
31+
32+
IMPLEMENT_MODULE(FLoadingScreenModule, LoadingScreen)
33+
34+
void FLoadingScreenModule::StartupModule()
35+
{
36+
// Load for cooker reference
37+
const ULoadingScreenSettings* Settings = GetDefault<ULoadingScreenSettings>();
38+
for ( const FStringAssetReference& Ref : Settings->StartupScreen.Images )
39+
{
40+
Ref.TryLoad();
41+
}
42+
for ( const FStringAssetReference& Ref : Settings->DefaultScreen.Images )
43+
{
44+
Ref.TryLoad();
45+
}
46+
47+
FCoreUObjectDelegates::PreLoadMap.AddRaw(this, &FLoadingScreenModule::HandlePreLoadMap);
48+
FCoreUObjectDelegates::PostLoadMap.AddRaw(this, &FLoadingScreenModule::HandlePostLoadMap);
49+
50+
if ( IsMoviePlayerEnabled() )
51+
{
52+
BeginLoadingScreen(Settings->StartupScreen);
53+
}
54+
}
55+
56+
void FLoadingScreenModule::ShutdownModule()
57+
{
58+
FCoreUObjectDelegates::PreLoadMap.RemoveAll(this);
59+
FCoreUObjectDelegates::PostLoadMap.RemoveAll(this);
60+
}
61+
62+
void FLoadingScreenModule::HandlePreLoadMap()
63+
{
64+
//if ( GEngine && GEngine->IsInitialized() )
65+
{
66+
const ULoadingScreenSettings* Settings = GetDefault<ULoadingScreenSettings>();
67+
BeginLoadingScreen(Settings->DefaultScreen);
68+
}
69+
}
70+
71+
void FLoadingScreenModule::HandlePostLoadMap()
72+
{
73+
}
74+
75+
void FLoadingScreenModule::BeginLoadingScreen(const FLoadingScreenDescription& ScreenDescription)
76+
{
77+
FLoadingScreenAttributes LoadingScreen;
78+
LoadingScreen.MinimumLoadingScreenDisplayTime = ScreenDescription.MinimumLoadingScreenDisplayTime;
79+
LoadingScreen.bAutoCompleteWhenLoadingCompletes = ScreenDescription.bAutoCompleteWhenLoadingCompletes;
80+
LoadingScreen.bMoviesAreSkippable = ScreenDescription.bMoviesAreSkippable;
81+
LoadingScreen.bWaitForManualStop = ScreenDescription.bWaitForManualStop;
82+
83+
//TODO if overridden...
84+
85+
if ( ScreenDescription.IsValid() )
86+
{
87+
LoadingScreen.MoviePaths = ScreenDescription.MoviePaths;
88+
LoadingScreen.WidgetLoadingScreen = SNew(SSimpleLoadingScreen, ScreenDescription);
89+
}
90+
else
91+
{
92+
LoadingScreen.WidgetLoadingScreen = FLoadingScreenAttributes::NewTestLoadingScreenWidget();
93+
}
94+
95+
GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
96+
}
97+
98+
void FLoadingScreenModule::EndLoadingScreen()
99+
{
100+
101+
}
102+
103+
#undef LOCTEXT_NAMESPACE
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
2+
3+
#include "CoreUObject.h"
4+
#include "Engine.h"
5+
6+
// You should place include statements to your module's private header files here. You only need to
7+
// add includes for headers that are used in most of your module's source files though.
8+
#include "ModuleManager.h"

0 commit comments

Comments
 (0)