wip 2
This commit is contained in:
parent
eb9512c8eb
commit
ea69d35f3c
@ -133,3 +133,13 @@ bShouldAcquireMissingChunksOnLoad=False
|
|||||||
bShouldWarnAboutInvalidAssets=True
|
bShouldWarnAboutInvalidAssets=True
|
||||||
MetaDataTagsForAssetRegistry=()
|
MetaDataTagsForAssetRegistry=()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[/Script/LoadingScreen.LoadingScreenSettings]
|
||||||
|
startupBackgroundImageA=/Game/Movies/Images/T_StartupImageA.T_StartupImageA
|
||||||
|
startupBackgroundImageB=/Game/Movies/Images/T_StartupImageB.T_StartupImageB
|
||||||
|
|
||||||
|
[/Script/StartupScreenModule.StartupScreenSettings]
|
||||||
|
imageA=/Game/Movies/Images/T_StartupImageA.T_StartupImageA
|
||||||
|
imageB=/Game/Movies/Images/T_StartupImageB.T_StartupImageB
|
||||||
|
|
||||||
|
BIN
UnrealProject/Lost_Edge/Content/Blueprints/BP_CustomGameInstance.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/BP_CustomGameInstance.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Player_BACKUP_1095.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Player_BACKUP_1095.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Player_BASE_1095.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Player_BASE_1095.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Player_LOCAL_1095.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Player_LOCAL_1095.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Player_REMOTE_1095.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Player_REMOTE_1095.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Movies/Images/T_StartupImageA.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Movies/Images/T_StartupImageA.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Movies/Images/T_StartupImageB.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Movies/Images/T_StartupImageB.uasset
(Stored with Git LFS)
Binary file not shown.
@ -22,6 +22,11 @@
|
|||||||
"AdditionalDependencies": [
|
"AdditionalDependencies": [
|
||||||
"Engine"
|
"Engine"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Lost_EdgeStyle",
|
||||||
|
"Type": "Runtime",
|
||||||
|
"LoadingPhase": "PostConfigInit"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Plugins": [
|
"Plugins": [
|
||||||
|
BIN
UnrealProject/Lost_Edge/Plugins/FMODStudio/Source/FMODStudio/FMODStudio.Build.cs
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Plugins/FMODStudio/Source/FMODStudio/FMODStudio.Build.cs
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/FMODStudio/Source/FMODStudioEditor/FMODStudioEditor.Build.cs
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Plugins/FMODStudio/Source/FMODStudioEditor/FMODStudioEditor.Build.cs
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/FMODStudioNiagara/Source/FMODStudioNiagara/FMODStudioNiagara.Build.cs
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Plugins/FMODStudioNiagara/Source/FMODStudioNiagara/FMODStudioNiagara.Build.cs
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/FlatNodes/Source/FlatNodes/FlatNodes.Build.cs
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Plugins/FlatNodes/Source/FlatNodes/FlatNodes.Build.cs
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Resources/Icon128.png
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Resources/Icon128.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Resources/Runtime/T_ImageA.png
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Resources/Runtime/T_ImageA.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Resources/Runtime/T_ImageB.png
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Resources/Runtime/T_ImageB.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/PreStartupScreen.Build.cs
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/PreStartupScreen.Build.cs
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/PreStartupScreen.cpp
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/PreStartupScreen.cpp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/PreStartupScreenPlayer.cpp
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/PreStartupScreenPlayer.cpp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/PreStartupScreenPlayer.h
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/PreStartupScreenPlayer.h
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/PreStartupScreenSettings.h
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/PreStartupScreenSettings.h
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/SPreStartupScreenWidget.cpp
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/SPreStartupScreenWidget.cpp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/SPreStartupScreenWidget.h
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Private/SPreStartupScreenWidget.h
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Public/PreStartupScreen.h
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/PreStartupScreen/Public/PreStartupScreen.h
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/SStartupScreenWidget.cpp
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/SStartupScreenWidget.cpp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/SStartupScreenWidget.h
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/SStartupScreenWidget.h
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/StartupScreen.cpp
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/StartupScreen.cpp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/StartupScreenPlayer.cpp
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/StartupScreenPlayer.cpp
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/StartupScreenPlayer.h
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/StartupScreenPlayer.h
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/StartupScreenSettings.h
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Private/StartupScreenSettings.h
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Public/StartupScreen.h
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/Public/StartupScreen.h
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/StartupScreen.Build.cs
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/Source/StartupScreen/StartupScreen.Build.cs
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/StartupScreen.uplugin
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Plugins/StartupScreen/StartupScreen.uplugin
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
using UnrealBuildTool;
|
using UnrealBuildTool;
|
||||||
|
|
||||||
public class Lost_EdgeTarget : TargetRules {
|
public class Lost_EdgeTarget : TargetRules
|
||||||
public Lost_EdgeTarget(TargetInfo Target) : base(Target) {
|
{
|
||||||
|
public Lost_EdgeTarget(TargetInfo Target) : base(Target)
|
||||||
|
{
|
||||||
Type = TargetType.Game;
|
Type = TargetType.Game;
|
||||||
DefaultBuildSettings = BuildSettingsVersion.Latest;
|
DefaultBuildSettings = BuildSettingsVersion.Latest;
|
||||||
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
|
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
|
||||||
|
@ -12,7 +12,7 @@ public class Lost_Edge : ModuleRules
|
|||||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OpenCV" });
|
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OpenCV" });
|
||||||
|
|
||||||
PrivateDependencyModuleNames.AddRange(new string[] { "EnhancedInput", "UMG", "RHI", "RenderCore", "Lost_EdgeShaders", "PakFile", //"TextureCompressor",
|
PrivateDependencyModuleNames.AddRange(new string[] { "EnhancedInput", "UMG", "RHI", "RenderCore", "Lost_EdgeShaders", "PakFile", //"TextureCompressor",
|
||||||
"LevelSequence", "MovieScene", "HTTP", "Json", "ApplicationCore", "ProceduralMeshComponent", "Landscape", "MoviePlayer", "Slate", "SlateCore" });
|
"LevelSequence", "MovieScene", "HTTP", "Json", "ApplicationCore", "ProceduralMeshComponent", "Landscape" });
|
||||||
|
|
||||||
if (Target.bBuildEditor)
|
if (Target.bBuildEditor)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
||||||
|
|
||||||
#include "Lost_EdgeGameModeBase.h"
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
|
||||||
#include "GameFramework/GameModeBase.h"
|
|
||||||
#include "Lost_EdgeGameModeBase.generated.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
UCLASS()
|
|
||||||
class LOST_EDGE_API ALost_EdgeGameModeBase : public AGameModeBase
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
|
|
||||||
};
|
|
@ -1,24 +0,0 @@
|
|||||||
// Oleg Petruny proprietary.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Kismet/BlueprintFunctionLibrary.h"
|
|
||||||
|
|
||||||
#include "CommonData.generated.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Collection of common/universal/without own scope/specific data values.
|
|
||||||
*/
|
|
||||||
UCLASS()
|
|
||||||
class UCommonData : public UBlueprintFunctionLibrary
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
|
|
||||||
public:
|
|
||||||
static const TSharedPtr<const FSlateBrush> KindaBlackColorBrush()
|
|
||||||
{
|
|
||||||
static auto brush = MakeShared<const FSlateColorBrush>(FLinearColor(0.01f, 0.01f, 0.01f));
|
|
||||||
return brush;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
@ -24,7 +24,7 @@ namespace
|
|||||||
const auto pakFileSavePath = FString::Printf(TEXT("%sDownloaded/"), *FPaths::ProjectDir());
|
const auto pakFileSavePath = FString::Printf(TEXT("%sDownloaded/"), *FPaths::ProjectDir());
|
||||||
}
|
}
|
||||||
|
|
||||||
void UContentLoader::BeginDestroy()
|
void UContentLoader::Deinitialize()
|
||||||
{
|
{
|
||||||
//if(mountedFiles.Num() > 0)
|
//if(mountedFiles.Num() > 0)
|
||||||
//{
|
//{
|
||||||
@ -34,7 +34,7 @@ void UContentLoader::BeginDestroy()
|
|||||||
// FPlatformFileManager::Get().RemovePlatformFile(GetPakPlatformFile());
|
// FPlatformFileManager::Get().RemovePlatformFile(GetPakPlatformFile());
|
||||||
//}
|
//}
|
||||||
|
|
||||||
UObject::BeginDestroy();
|
Super::Deinitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UContentLoader::HttpGet(const FString& url, FHttpRequestCompleteDelegate requestCompleteCallback)
|
void UContentLoader::HttpGet(const FString& url, FHttpRequestCompleteDelegate requestCompleteCallback)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Http.h"
|
#include "Http.h"
|
||||||
#include "UObject/Object.h"
|
#include "Subsystems/GameInstanceSubsystem.h"
|
||||||
|
|
||||||
#include "ContentLoader.generated.h"
|
#include "ContentLoader.generated.h"
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ DECLARE_DYNAMIC_DELEGATE_OneParam(FContentDownloadedCallback, FString, pakFilePa
|
|||||||
* High language wrapper for Paks(Assets) download and loading.
|
* High language wrapper for Paks(Assets) download and loading.
|
||||||
*/
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class UContentLoader : public UObject
|
class UContentLoader : public UGameInstanceSubsystem
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ public:
|
|||||||
bool UnloadPak(const FString& pakFilePath);
|
bool UnloadPak(const FString& pakFilePath);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void BeginDestroy() override;
|
virtual void Deinitialize() override;
|
||||||
|
|
||||||
/** Sends http get request */
|
/** Sends http get request */
|
||||||
void HttpGet(const FString& url, FHttpRequestCompleteDelegate requestCompleteCallback);
|
void HttpGet(const FString& url, FHttpRequestCompleteDelegate requestCompleteCallback);
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "ContentLoader.h"
|
#include "ContentLoader.h"
|
||||||
#include "CustomGameSettings.h"
|
#include "CustomGameSettings.h"
|
||||||
#include "Levels/LevelBase.h"
|
#include "Levels/LevelBase.h"
|
||||||
#include "LoadingScreen/LoadingScreen.h"
|
|
||||||
#include "PlayerBase.h"
|
#include "PlayerBase.h"
|
||||||
#include "SaveData.h"
|
#include "SaveData.h"
|
||||||
|
|
||||||
@ -26,9 +25,6 @@ void UCustomGameInstance::Init()
|
|||||||
UGameInstance::Init();
|
UGameInstance::Init();
|
||||||
instance = this;
|
instance = this;
|
||||||
|
|
||||||
// setup content loader
|
|
||||||
contentLoader = NewObject<UContentLoader>(this);
|
|
||||||
|
|
||||||
// setup global singletons
|
// setup global singletons
|
||||||
for(auto& _class : globalInstancesClasses)
|
for(auto& _class : globalInstancesClasses)
|
||||||
{
|
{
|
||||||
@ -44,10 +40,13 @@ void UCustomGameInstance::Init()
|
|||||||
else
|
else
|
||||||
saveData = Cast<USaveData>(UGameplayStatics::CreateSaveGameObject(USaveData::StaticClass()));
|
saveData = Cast<USaveData>(UGameplayStatics::CreateSaveGameObject(USaveData::StaticClass()));
|
||||||
|
|
||||||
// setup loading screen
|
//FCoreUObjectDelegates::PreLoadMap.AddLambda([&](const FString& mapName)
|
||||||
loadingScreen = NewObject<ULoadingScreen>(this);
|
// {
|
||||||
FCoreUObjectDelegates::PreLoadMap.AddUObject(loadingScreen, &ULoadingScreen::BeginLoadingScreen);
|
// if(auto loadingScreen = FModuleManager::LoadModulePtr<FLoadingScreen>("LoadingScreen"))
|
||||||
FCoreUObjectDelegates::PostLoadMapWithWorld.AddUObject(loadingScreen, &ULoadingScreen::EndLoadingScreen);
|
// loadingScreen->StartLoadingScreen();
|
||||||
|
// });
|
||||||
|
|
||||||
|
//FCoreUObjectDelegates::PostLoadMapWithWorld.AddLambda(loadingScreen, &ULoadingScreen::EndLoadingScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UCustomGameInstance::Shutdown()
|
void UCustomGameInstance::Shutdown()
|
||||||
@ -66,7 +65,7 @@ UCustomGameInstance* UCustomGameInstance::Get()
|
|||||||
UContentLoader* UCustomGameInstance::GetContentLoader()
|
UContentLoader* UCustomGameInstance::GetContentLoader()
|
||||||
{
|
{
|
||||||
if(auto GI = Get())
|
if(auto GI = Get())
|
||||||
return GI->contentLoader;
|
return GI->GetSubsystem<UContentLoader>();
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ public:
|
|||||||
|
|
||||||
UFUNCTION(BlueprintPure, meta = (DisplayName = "Get Custom Game Instance"))
|
UFUNCTION(BlueprintPure, meta = (DisplayName = "Get Custom Game Instance"))
|
||||||
static UCustomGameInstance* Get();
|
static UCustomGameInstance* Get();
|
||||||
UFUNCTION(BlueprintPure)
|
UFUNCTION(BlueprintPure, meta = (DeprecatedFunction, DeprecationMessage = "Use original Get Submodule pure function instead."))
|
||||||
static class UContentLoader* GetContentLoader();
|
static class UContentLoader* GetContentLoader();
|
||||||
UFUNCTION(BlueprintPure)
|
UFUNCTION(BlueprintPure)
|
||||||
static UObject* GetGlobalInstance(UClass* _class);
|
static UObject* GetGlobalInstance(UClass* _class);
|
||||||
@ -50,11 +50,6 @@ public:
|
|||||||
class USaveData* saveData = nullptr;
|
class USaveData* saveData = nullptr;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UPROPERTY()
|
|
||||||
class UContentLoader* contentLoader;
|
|
||||||
UPROPERTY()
|
|
||||||
class ULoadingScreen* loadingScreen;
|
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly)
|
UPROPERTY(EditDefaultsOnly)
|
||||||
TSet<TSubclassOf<UObject>> globalInstancesClasses;
|
TSet<TSubclassOf<UObject>> globalInstancesClasses;
|
||||||
TMap<UClass*, UObject*> globalInstances;
|
TMap<UClass*, UObject*> globalInstances;
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
// Oleg Petruny proprietary.
|
|
||||||
|
|
||||||
#include "LoadingScreen.h"
|
|
||||||
|
|
||||||
#include "MoviePlayer.h"
|
|
||||||
|
|
||||||
#include "SLoadingScreenWidget.h"
|
|
||||||
|
|
||||||
void ULoadingScreen::BeginLoadingScreen(const FString& mapName)
|
|
||||||
{
|
|
||||||
if(active || IsRunningDedicatedServer())
|
|
||||||
return;
|
|
||||||
active = true;
|
|
||||||
|
|
||||||
FLoadingScreenAttributes params;
|
|
||||||
params.bAutoCompleteWhenLoadingCompletes = false;
|
|
||||||
params.MinimumLoadingScreenDisplayTime = 2.0f;
|
|
||||||
if(first)
|
|
||||||
{
|
|
||||||
// Game init loading screen
|
|
||||||
first = false;
|
|
||||||
params.bMoviesAreSkippable = true;
|
|
||||||
params.WidgetLoadingScreen = SNew(SStartupImageWidget)
|
|
||||||
.FadeDuration(params.MinimumLoadingScreenDisplayTime);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Game level loading screen
|
|
||||||
params.WidgetLoadingScreen = SNew(SStartupImageWidget)
|
|
||||||
.FadeDuration(params.MinimumLoadingScreenDisplayTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
GetMoviePlayer()->SetupLoadingScreen(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ULoadingScreen::EndLoadingScreen(UWorld* inLoadedWorld)
|
|
||||||
{
|
|
||||||
if(!active)
|
|
||||||
return;
|
|
||||||
active = false;
|
|
||||||
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
// Oleg Petruny proprietary.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "UObject/Object.h"
|
|
||||||
|
|
||||||
#include "LoadingScreen.generated.h"
|
|
||||||
|
|
||||||
UCLASS()
|
|
||||||
class ULoadingScreen : public UObject
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
|
|
||||||
public:
|
|
||||||
UFUNCTION()
|
|
||||||
void BeginLoadingScreen(const FString& mapName);
|
|
||||||
UFUNCTION()
|
|
||||||
void EndLoadingScreen(UWorld* inLoadedWorld);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool active = false;
|
|
||||||
bool first = true;
|
|
||||||
};
|
|
@ -1,97 +0,0 @@
|
|||||||
// Oleg Petruny proprietary.
|
|
||||||
|
|
||||||
#include "SLoadingScreenWidget.h"
|
|
||||||
|
|
||||||
#include "Engine/Texture2D.h"
|
|
||||||
#include "Slate/DeferredCleanupSlateBrush.h"
|
|
||||||
#include "Widgets/Images/SImage.h"
|
|
||||||
#include "Widgets/Layout/SBorder.h"
|
|
||||||
#include "Widgets/Layout/SScaleBox.h"
|
|
||||||
|
|
||||||
#include "CommonData.h"
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
constexpr auto startupImageA = TEXT("/Script/Engine.Texture2D'/Game/Movies/Images/T_StartupImageA.T_StartupImageA'");
|
|
||||||
constexpr auto startupImageB = TEXT("/Script/Engine.Texture2D'/Game/Movies/Images/T_StartupImageB.T_StartupImageB'");
|
|
||||||
}
|
|
||||||
|
|
||||||
void SStartupImageWidget::Construct(const FArguments& inArgs)
|
|
||||||
{
|
|
||||||
FSoftObjectPath assetA{ startupImageA };
|
|
||||||
UTexture2D* imageA = Cast<UTexture2D>(assetA.TryLoad());
|
|
||||||
check(imageA); // image A loading failed
|
|
||||||
FSoftObjectPath assetB{ startupImageB };
|
|
||||||
UTexture2D* imageB = Cast<UTexture2D>(assetB.TryLoad());
|
|
||||||
check(imageB); // image B loading failed
|
|
||||||
|
|
||||||
// cache brushes into memory
|
|
||||||
imageABrush = FDeferredCleanupSlateBrush::CreateBrush(imageA);
|
|
||||||
imageBBrush = FDeferredCleanupSlateBrush::CreateBrush(imageB);
|
|
||||||
imageAWidget = SNew(SImage).Image(imageABrush->GetSlateBrush()).RenderOpacity(1.0f);
|
|
||||||
imageBWidget = SNew(SImage).Image(imageBBrush->GetSlateBrush()).RenderOpacity(0.0f);
|
|
||||||
|
|
||||||
// construct widget
|
|
||||||
ChildSlot
|
|
||||||
[
|
|
||||||
SNew(SBorder)
|
|
||||||
.HAlign(HAlign_Fill)
|
|
||||||
.VAlign(VAlign_Fill)
|
|
||||||
.Padding(0)
|
|
||||||
.BorderImage(UCommonData::KindaBlackColorBrush().Get())
|
|
||||||
[
|
|
||||||
SNew(SScaleBox)
|
|
||||||
.HAlign(HAlign_Fill)
|
|
||||||
.VAlign(VAlign_Fill)
|
|
||||||
.Stretch(EStretch::ScaleToFitY)
|
|
||||||
.StretchDirection(EStretchDirection::Both)
|
|
||||||
[
|
|
||||||
SNew(SOverlay)
|
|
||||||
+ SOverlay::Slot()
|
|
||||||
[
|
|
||||||
imageAWidget.ToSharedRef()
|
|
||||||
]
|
|
||||||
+ SOverlay::Slot()
|
|
||||||
[
|
|
||||||
imageBWidget.ToSharedRef()
|
|
||||||
]
|
|
||||||
+ SOverlay::Slot()
|
|
||||||
[
|
|
||||||
SNew(STextBlock).Text(FText::FromString(TEXT("Loading...")))
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
// start fading
|
|
||||||
isFading = true;
|
|
||||||
fadeDuration = inArgs._FadeDuration;
|
|
||||||
currentTime = 0.0f;
|
|
||||||
fadeTickHandle = FTSTicker::GetCoreTicker().AddTicker(
|
|
||||||
FTickerDelegate::CreateRaw(this, &SStartupImageWidget::FadeTick),
|
|
||||||
0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
SStartupImageWidget::~SStartupImageWidget()
|
|
||||||
{
|
|
||||||
isFading = false;
|
|
||||||
FTSTicker::GetCoreTicker().RemoveTicker(fadeTickHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SStartupImageWidget::FadeTick(float deltaTime)
|
|
||||||
{
|
|
||||||
currentTime += deltaTime;
|
|
||||||
float fade = currentTime / fadeDuration;
|
|
||||||
|
|
||||||
if(fade > 1.0f)
|
|
||||||
{
|
|
||||||
fade = 1.0f;
|
|
||||||
isFading = false;
|
|
||||||
FTSTicker::GetCoreTicker().RemoveTicker(fadeTickHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
imageAWidget->SetRenderOpacity(1.0f - fade);
|
|
||||||
imageBWidget->SetRenderOpacity(fade);
|
|
||||||
|
|
||||||
return isFading;
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
// Oleg Petruny proprietary.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Widgets/SCompoundWidget.h"
|
|
||||||
|
|
||||||
struct FLoadingScreenWidgetArguments
|
|
||||||
{
|
|
||||||
float fadeDuration = 2.0f;
|
|
||||||
};
|
|
||||||
|
|
||||||
class SStartupImageWidget : public SCompoundWidget
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
SLATE_BEGIN_ARGS(SStartupImageWidget) {}
|
|
||||||
SLATE_ARGUMENT(float, FadeDuration)
|
|
||||||
SLATE_END_ARGS()
|
|
||||||
|
|
||||||
void Construct(const FArguments& inArgs);
|
|
||||||
|
|
||||||
virtual ~SStartupImageWidget();
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool FadeTick(float deltaTime);
|
|
||||||
|
|
||||||
TSharedPtr<class FDeferredCleanupSlateBrush> imageABrush;
|
|
||||||
TSharedPtr<class FDeferredCleanupSlateBrush> imageBBrush;
|
|
||||||
TSharedPtr<SImage> imageAWidget;
|
|
||||||
TSharedPtr<SImage> imageBWidget;
|
|
||||||
|
|
||||||
float fadeDuration;
|
|
||||||
float currentTime;
|
|
||||||
bool isFading = false;
|
|
||||||
FTSTicker::FDelegateHandle fadeTickHandle;
|
|
||||||
};
|
|
@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
using UnrealBuildTool;
|
using UnrealBuildTool;
|
||||||
|
|
||||||
public class Lost_EdgeEditorTarget : TargetRules {
|
public class Lost_EdgeEditorTarget : TargetRules
|
||||||
public Lost_EdgeEditorTarget(TargetInfo Target) : base(Target) {
|
{
|
||||||
|
public Lost_EdgeEditorTarget(TargetInfo Target) : base(Target)
|
||||||
|
{
|
||||||
Type = TargetType.Editor;
|
Type = TargetType.Editor;
|
||||||
DefaultBuildSettings = BuildSettingsVersion.Latest;
|
DefaultBuildSettings = BuildSettingsVersion.Latest;
|
||||||
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
|
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
// Oleg Petruny proprietary.
|
// Oleg Petruny proprietary.
|
||||||
|
|
||||||
|
using System.IO;
|
||||||
using UnrealBuildTool;
|
using UnrealBuildTool;
|
||||||
|
|
||||||
public class Lost_EdgeShaders : ModuleRules
|
public class Lost_EdgeShaders : ModuleRules
|
||||||
{
|
{
|
||||||
public Lost_EdgeShaders(ReadOnlyTargetRules Target) : base(Target)
|
public Lost_EdgeShaders(ReadOnlyTargetRules Target) : base(Target)
|
||||||
{
|
{
|
||||||
//bPrecompile = true;
|
//if (File.Exists($"{PlatformDirectory.FullName}\\..\\..\\Intermediate\\Build\\Win64\\x64\\UnrealEditor\\DebugGame\\{Path.GetFileName(PlatformDirectory.FullName)}\\UnrealEditor-{Path.GetFileName(PlatformDirectory.FullName)}-Win64-DebugGame.lib"))
|
||||||
// bUsePrecompiled = true;
|
// bUsePrecompiled = true;
|
||||||
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
PublicDependencyModuleNames.AddRange(new string[] { });
|
PublicDependencyModuleNames.AddRange(new string[] { });
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
// Oleg Petruny proprietary.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class Lost_EdgeStyle : ModuleRules
|
||||||
|
{
|
||||||
|
public Lost_EdgeStyle(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
//if (File.Exists($"{PlatformDirectory.FullName}\\..\\..\\Intermediate\\Build\\Win64\\x64\\UnrealEditor\\DebugGame\\{Path.GetFileName(PlatformDirectory.FullName)}\\UnrealEditor-{Path.GetFileName(PlatformDirectory.FullName)}-Win64-DebugGame.lib"))
|
||||||
|
// bUsePrecompiled = true;
|
||||||
|
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
PublicDependencyModuleNames.AddRange(new string[] { });
|
||||||
|
PrivateDependencyModuleNames.AddRange(new string[] {
|
||||||
|
"Core",
|
||||||
|
"CoreUObject",
|
||||||
|
"Slate",
|
||||||
|
"SlateCore"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
// Oleg Petruny proprietary.
|
||||||
|
|
||||||
|
#include "Lost_EdgeStyle.h"
|
||||||
|
|
||||||
|
#include "Styling/SlateStyleRegistry.h"
|
||||||
|
|
||||||
|
TUniquePtr<FSlateStyleSet> FLost_EdgeStyle::style = nullptr;
|
||||||
|
|
||||||
|
void FLost_EdgeStyle::StartupModule()
|
||||||
|
{
|
||||||
|
if(style.IsValid())
|
||||||
|
return;
|
||||||
|
|
||||||
|
style = MakeUnique<FSlateStyleSet>(GetStyleSetName());
|
||||||
|
|
||||||
|
style->Set(TEXT("BackgroundBlack"), FLinearColor(0.01f, 0.01f, 0.01f, 0));
|
||||||
|
style->Set(TEXT("BackgroundBlack"), FSlateColor(style->GetColor(TEXT("BackgroundBlack"))));
|
||||||
|
style->Set(TEXT("BackgroundBlack"), new FSlateColorBrush(style->GetColor(TEXT("BackgroundBlack"))));
|
||||||
|
|
||||||
|
FSlateStyleRegistry::RegisterSlateStyle(Get());
|
||||||
|
}
|
||||||
|
|
||||||
|
void FLost_EdgeStyle::ShutdownModule()
|
||||||
|
{
|
||||||
|
if(!style.IsValid())
|
||||||
|
return;
|
||||||
|
|
||||||
|
FSlateStyleRegistry::UnRegisterSlateStyle(Get());
|
||||||
|
style.Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FLost_EdgeStyle::IsGameModule() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const ISlateStyle& FLost_EdgeStyle::Get()
|
||||||
|
{
|
||||||
|
return *style.Get();
|
||||||
|
}
|
||||||
|
|
||||||
|
FName FLost_EdgeStyle::GetStyleSetName()
|
||||||
|
{
|
||||||
|
static const FName name(TEXT("Lost_EdgeStyle"));
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
IMPLEMENT_GAME_MODULE(FLost_EdgeStyle, Lost_EdgeStyle);
|
@ -0,0 +1,21 @@
|
|||||||
|
// Oleg Petruny proprietary.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Modules/ModuleInterface.h"
|
||||||
|
#include "Styling/SlateStyle.h"
|
||||||
|
|
||||||
|
class LOST_EDGESTYLE_API FLost_EdgeStyle : public IModuleInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void StartupModule() override;
|
||||||
|
virtual void ShutdownModule() override;
|
||||||
|
virtual bool IsGameModule() const override;
|
||||||
|
|
||||||
|
static const ISlateStyle& Get();
|
||||||
|
static FName GetStyleSetName();
|
||||||
|
|
||||||
|
private:
|
||||||
|
static TUniquePtr<FSlateStyleSet> style;
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user