mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-22 12:03:04 +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 {};
|
||||
|
||||
|
||||
|
||||
#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);
|
||||
|
|
Loading…
Reference in a new issue