Comments (1)
I'm not sure if this fixed everything. But here you have a dirty solution.
Replace your LoadingScreenModule.cpp with
This:
#include "LoadingScreenPrivatePCH.h"
#include "ILoadingScreenModule.h"
#include "LoadingScreenSettings.h"
#include "MoviePlayer.h"
#include "SSimpleLoadingScreen.h"
#define LOCTEXT_NAMESPACE "LoadingScreen"
class FLoadingScreenModule : public ILoadingScreenModule
{
public:
FLoadingScreenModule();
/** IModuleInterface implementation */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
virtual bool IsGameModule() const override
{
return true;
}
private:
void HandlePrepareLoadingScreen();
void BeginLoadingScreen(const FLoadingScreenDescription& ScreenDescription);
};
IMPLEMENT_MODULE(FLoadingScreenModule, LoadingScreen)
FLoadingScreenModule::FLoadingScreenModule()
{
}
void FLoadingScreenModule::StartupModule()
{
if ( !IsRunningDedicatedServer() && FSlateApplication::IsInitialized() )
{
// Load for cooker reference
const ULoadingScreenSettings* Settings = GetDefault<ULoadingScreenSettings>();
for ( const FStringAssetReference& Ref : Settings->StartupScreen.Images )
{
Ref.TryLoad();
}
for ( const FStringAssetReference& Ref : Settings->DefaultScreen.Images )
{
Ref.TryLoad();
}
if ( IsMoviePlayerEnabled() )
{
GetMoviePlayer()->OnPrepareLoadingScreen().AddRaw(this, &FLoadingScreenModule::HandlePrepareLoadingScreen);
}
// Prepare the startup screen, the PrepareLoadingScreen callback won't be called
// if we've already explictly setup the loading screen.
BeginLoadingScreen(Settings->DefaultScreen);
}
}
void FLoadingScreenModule::ShutdownModule()
{
if ( !IsRunningDedicatedServer() )
{
GetMoviePlayer()->StopMovie();
}
}
void FLoadingScreenModule::HandlePrepareLoadingScreen()
{
UE_LOG(LogTemp, Warning, TEXT("Preparing loading screen...."));
const ULoadingScreenSettings* Settings = GetDefault<ULoadingScreenSettings>();
BeginLoadingScreen(Settings->DefaultScreen);
}
void FLoadingScreenModule::BeginLoadingScreen(const FLoadingScreenDescription& ScreenDescription)
{
FLoadingScreenAttributes LoadingScreen;
LoadingScreen.MinimumLoadingScreenDisplayTime = ScreenDescription.MinimumLoadingScreenDisplayTime;
LoadingScreen.bAutoCompleteWhenLoadingCompletes = ScreenDescription.bAutoCompleteWhenLoadingCompletes;
LoadingScreen.bMoviesAreSkippable = ScreenDescription.bMoviesAreSkippable;
LoadingScreen.bWaitForManualStop = ScreenDescription.bWaitForManualStop;
LoadingScreen.MoviePaths = ScreenDescription.MoviePaths;
LoadingScreen.PlaybackType = EMoviePlaybackType::MT_LoadingLoop;
if ( ScreenDescription.bShowUIOverlay )
{
LoadingScreen.WidgetLoadingScreen = SNew(SSimpleLoadingScreen, ScreenDescription);
}
GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
}
#undef LOCTEXT_NAMESPACE
from loadingscreen.
Related Issues (20)
- mp4 video format ? HOT 1
- 4.20 not work
- any way to use bp widget for loading ? HOT 1
- Does it Support SteamVR? HOT 5
- Adding tips and setting MinimumLoadingScreenDisplayTime issue
- Border CreateBrush FMargin and DrawAs
- Works in PIE Standalone but not packaged project HOT 2
- IT WORKS ON CONSOLE, THANK YOU NICK!!!!!!!!
- Upgrade to 4.23 HOT 5
- How do you use this?
- doesnt work on 4.24
- an issue with 4.24 HOT 1
- Update to 4.24
- Doesn't work on mobile? HOT 1
- How to change the design of the spinning object left to the text in Loading Screen plugin
- Update to UE4.25.3 HOT 1
- Update to 4.26.2
- 4.27 HOT 2
- Trying to integrate to 5.0.3 engine version HOT 1
- Loading screen not showing on packaged project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loadingscreen.