Remove CVars for loading screen options to prevent them from constantly resetting the project settings.

This commit is contained in:
Jamie Greunbaum 2023-05-29 22:22:17 -04:00
parent a78d861a7a
commit ad35203527
2 changed files with 5 additions and 32 deletions

View File

@ -2,7 +2,7 @@
#pragma once #pragma once
#include "Engine/DeveloperSettingsBackedByCVars.h" #include "Engine/DeveloperSettings.h"
#include "HAL/Platform.h" #include "HAL/Platform.h"
#include "UObject/SoftObjectPath.h" #include "UObject/SoftObjectPath.h"
#include "UObject/UObjectGlobals.h" #include "UObject/UObjectGlobals.h"
@ -14,7 +14,7 @@
* Settings for a loading screen system. * Settings for a loading screen system.
*/ */
UCLASS(config=Game, defaultconfig, meta=(DisplayName="Common Loading Screen")) UCLASS(config=Game, defaultconfig, meta=(DisplayName="Common Loading Screen"))
class UCommonLoadingScreenSettings : public UDeveloperSettingsBackedByCVars class UCommonLoadingScreenSettings : public UDeveloperSettings
{ {
GENERATED_BODY() GENERATED_BODY()
@ -36,7 +36,7 @@ public:
// //
// Note: This is not normally applied in the editor for iteration time, but can be // Note: This is not normally applied in the editor for iteration time, but can be
// enabled via HoldLoadingScreenAdditionalSecsEvenInEditor // enabled via HoldLoadingScreenAdditionalSecsEvenInEditor
UPROPERTY(config, EditAnywhere, Category=Configuration, meta=(ForceUnits=s, ConsoleVariable="CommonLoadingScreen.HoldLoadingScreenAdditionalSecs")) UPROPERTY(config, EditAnywhere, Category=Configuration, meta=(ForceUnits=s))
float HoldLoadingScreenAdditionalSecs = 0.0f; float HoldLoadingScreenAdditionalSecs = 0.0f;
// The interval in seconds beyond which the loading screen is considered permanently hung (if non-zero). // The interval in seconds beyond which the loading screen is considered permanently hung (if non-zero).
@ -48,11 +48,11 @@ public:
float LogLoadingScreenHeartbeatInterval = 5.0f; float LogLoadingScreenHeartbeatInterval = 5.0f;
// When true, the reason the loading screen is shown or hidden will be printed to the log every frame. // When true, the reason the loading screen is shown or hidden will be printed to the log every frame.
UPROPERTY(Transient, EditAnywhere, Category=Debugging, meta=(ConsoleVariable="CommonLoadingScreen.LogLoadingScreenReasonEveryFrame")) UPROPERTY(Transient, EditAnywhere, Category=Debugging)
bool LogLoadingScreenReasonEveryFrame = 0; bool LogLoadingScreenReasonEveryFrame = 0;
// Force the loading screen to be displayed (useful for debugging) // Force the loading screen to be displayed (useful for debugging)
UPROPERTY(Transient, EditAnywhere, Category=Debugging, meta=(ConsoleVariable="CommonLoadingScreen.AlwaysShow")) UPROPERTY(Transient, EditAnywhere, Category=Debugging)
bool ForceLoadingScreenVisible = false; bool ForceLoadingScreenVisible = false;
// Should we apply the additional HoldLoadingScreenAdditionalSecs delay even in the editor // Should we apply the additional HoldLoadingScreenAdditionalSecs delay even in the editor

View File

@ -64,33 +64,6 @@ bool ILoadingProcessInterface::ShouldShowLoadingScreen(UObject* TestObject, FStr
return false; return false;
} }
//////////////////////////////////////////////////////////////////////
namespace LoadingScreenCVars
{
// CVars
static float HoldLoadingScreenAdditionalSecs = 0.0f;
static FAutoConsoleVariableRef CVarHoldLoadingScreenUpAtLeastThisLongInSecs(
TEXT("CommonLoadingScreen.HoldLoadingScreenAdditionalSecs"),
HoldLoadingScreenAdditionalSecs,
TEXT("How long to hold the loading screen up after other loading finishes (in seconds) to try to give texture streaming a chance to avoid blurriness"),
ECVF_Default | ECVF_Preview);
static bool LogLoadingScreenReasonEveryFrame = false;
static FAutoConsoleVariableRef CVarLogLoadingScreenReasonEveryFrame(
TEXT("CommonLoadingScreen.LogLoadingScreenReasonEveryFrame"),
LogLoadingScreenReasonEveryFrame,
TEXT("When true, the reason the loading screen is shown or hidden will be printed to the log every frame."),
ECVF_Default);
static bool ForceLoadingScreenVisible = false;
static FAutoConsoleVariableRef CVarForceLoadingScreenVisible(
TEXT("CommonLoadingScreen.AlwaysShow"),
ForceLoadingScreenVisible,
TEXT("Force the loading screen to show."),
ECVF_Default);
}
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// FLoadingScreenInputPreProcessor // FLoadingScreenInputPreProcessor