kode80 / kode80CloudsUnity3D

A realtime volumetric cloud rendering solution for Unity3D.
367 stars 64 forks source link

how can i enable/disable clouds for multiple shots in one scene #13

Open nbac opened 7 years ago

nbac commented 7 years ago

i do have multiple cameras set up. there are multiple clouds setups for those different cameras. if i enable disable them maunally everything works fine but on runtime per script it is not working. unity says

Destroying GameObjects immediately is not permitted during physics trigger/contact, animation event callbacks or OnValidate. You must use Destroy instead. UnityEngine.Object:DestroyImmediate(Object) kode80.Clouds.kode80Clouds:DestroyFullscreenQuad() (at Assets/kode80/Clouds/Scripts/kode80Clouds.cs:479) kode80.Clouds.kode80Clouds:OnDisable() (at Assets/kode80/Clouds/Scripts/kode80Clouds.cs:211) UnityEngine.GameObject:SetActive(Boolean)