fix day-time manager

This commit is contained in:
in0finite 2022-01-26 21:25:33 +01:00
parent 14ba0a78fb
commit a39a584683

View file

@ -53,7 +53,23 @@ namespace SanAndreasUnity.Behaviours.World
public event System.Action onHourChanged = delegate {};
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoadMethod]
static void InitOnLoad()
{
if (null == Singleton)
return;
Singleton.Init();
}
#endif
protected override void OnSingletonAwake()
{
this.Init();
}
void Init()
{
m_originalLightColor = this.directionalLight.color;
m_originalSkyboxExposure = RenderSettings.skybox.GetFloat(ExposurePropertyId);