add grey skybox setting

This commit is contained in:
Mister_Nebula 2021-12-30 13:55:41 +00:00
parent 32e8fe7bc0
commit b0438cc2d4
3 changed files with 24 additions and 0 deletions

View File

@ -50,6 +50,7 @@ namespace QSB
public static bool ShowDebugLabels => DebugMode && DebugSettings.ShowDebugLabels;
public static bool AvoidTimeSync => DebugMode && DebugSettings.AvoidTimeSync;
public static bool SkipTitleScreen => DebugMode && DebugSettings.SkipTitleScreen;
public static bool GreySkybox => DebugMode && DebugSettings.GreySkybox;
public static AssetBundle NetworkAssetBundle { get; internal set; }
public static AssetBundle InstrumentAssetBundle { get; private set; }
public static AssetBundle ConversationAssetBundle { get; private set; }
@ -107,6 +108,7 @@ namespace QSB
gameObject.AddComponent<SatelliteProjectorManager>();
gameObject.AddComponent<StatueManager>();
gameObject.AddComponent<GalaxyMapManager>();
gameObject.AddComponent<DebugCameraSettings>();
// WorldObject managers
foreach (var type in typeof(WorldObjectManager).GetDerivedTypes())

View File

@ -0,0 +1,19 @@
using UnityEngine;
namespace QSB.Utility
{
internal class DebugCameraSettings : MonoBehaviour
{
void Start()
{
if (QSBCore.GreySkybox)
{
QSBSceneManager.OnSceneLoaded += OnSceneLoaded;
Camera.main.backgroundColor = Color.gray;
}
}
private void OnSceneLoaded(OWScene arg1, OWScene arg2, bool arg3)
=> Camera.main.backgroundColor = Color.gray;
}
}

View File

@ -21,5 +21,8 @@ namespace QSB.Utility
[JsonProperty("skipTitleScreen")]
public bool SkipTitleScreen { get; set; } = false;
[JsonProperty("greySkybox")]
public bool GreySkybox { get; set; } = false;
}
}