/// <summary> /// Creation and setup of post processing components. /// </summary> private void InitImageEffects() { EnviroSkyRender = PlayerCamera.gameObject.GetComponent <EnviroSkyRenderingLW>(); if (EnviroSkyRender == null) { EnviroSkyRender = PlayerCamera.gameObject.AddComponent <EnviroSkyRenderingLW>(); } EnviroPostProcessing = PlayerCamera.gameObject.GetComponent <EnviroPostProcessing>(); if (EnviroPostProcessing == null) { EnviroPostProcessing = PlayerCamera.gameObject.AddComponent <EnviroPostProcessing>(); } }
private void InitImageEffects() { if (addEnviroSkyRendering) { skyRender = myCam.gameObject.GetComponent <EnviroSkyRenderingLW>(); if (skyRender == null) { skyRender = myCam.gameObject.AddComponent <EnviroSkyRenderingLW>(); } skyRender.isAddionalCamera = true; } if (addEnviroSkyPostProcessing) { enviroPostProcessing = myCam.gameObject.GetComponent <EnviroPostProcessing>(); if (enviroPostProcessing == null) { enviroPostProcessing = myCam.gameObject.AddComponent <EnviroPostProcessing>(); } } }