mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 05:50:18 +00:00
fix day-time manager
This commit is contained in:
parent
14ba0a78fb
commit
a39a584683
1 changed files with 16 additions and 0 deletions
|
@ -53,7 +53,23 @@ namespace SanAndreasUnity.Behaviours.World
|
||||||
public event System.Action onHourChanged = delegate {};
|
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()
|
protected override void OnSingletonAwake()
|
||||||
|
{
|
||||||
|
this.Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Init()
|
||||||
{
|
{
|
||||||
m_originalLightColor = this.directionalLight.color;
|
m_originalLightColor = this.directionalLight.color;
|
||||||
m_originalSkyboxExposure = RenderSettings.skybox.GetFloat(ExposurePropertyId);
|
m_originalSkyboxExposure = RenderSettings.skybox.GetFloat(ExposurePropertyId);
|
||||||
|
|
Loading…
Reference in a new issue