Beispiel #1
0
 void Cleanup()
 {
     if (Application.isPlaying)
     {
         GerstnerWavesJobs.Cleanup();
     }
     RenderPipelineManager.beginCameraRendering -= BeginCameraRendering;
     if (_depthCam)
     {
         _depthCam.targetTexture = null;
         SafeDestroy(_depthCam.gameObject);
     }
     if (_depthTex)
     {
         SafeDestroy(_depthTex);
     }
     if (_waveBuffer != null)
     {
         _waveBuffer.Dispose();
     }
 }
Beispiel #2
0
 private void OnApplicationQuit()
 {
     GerstnerWavesJobs.Cleanup();
 }