Example #1
0
 private void OnDestroy()
 {
     if (WeatherMakerCommandBufferManagerScript.Instance != null)
     {
         WeatherMakerCommandBufferManagerScript.Instance.UnregisterPreCull(this);
     }
     WeatherMakerScript.ReleaseInstance(ref instance);
 }
 protected override void OnDestroy()
 {
     base.OnDestroy();
     if (WeatherMakerCommandBufferManagerScript.Instance != null)
     {
         WeatherMakerCommandBufferManagerScript.Instance.UnregisterPreCull(this);
         WeatherMakerCommandBufferManagerScript.Instance.UnregisterPreRender(this);
         WeatherMakerCommandBufferManagerScript.Instance.UnregisterPostRender(this);
     }
     WeatherMakerScript.ReleaseInstance(ref instance);
 }
        private void OnDestroy()
        {
            TweenFactory.Clear();
            WeatherMakerObjectExtensions.Clear();

            // remove lightning bolt lights from the light manager
            if (Application.isPlaying && WeatherMakerLightManagerScript.Instance != null && WeatherMakerThunderAndLightningScript.Instance != null)
            {
                WeatherMakerThunderAndLightningScript.Instance.LightningBoltScript.LightAddedCallback   -= LightningLightAdded;
                WeatherMakerThunderAndLightningScript.Instance.LightningBoltScript.LightRemovedCallback -= LightningLightRemoved;
            }

            WeatherMakerScript.ReleaseInstance(ref instance);
        }
Example #4
0
 private void OnDestroy()
 {
     WeatherMakerScript.ReleaseInstance(ref instance);
 }
Example #5
0
 protected override void OnDestroy()
 {
     WeatherMakerScript.ReleaseInstance(ref instance);
 }