How can i turn on/off post post processing layer via script

Hi i need help with turning on/off post processing layer via script.
Here is script for turning on/off fog/vignette etc. but how can i turn on/off full PPP/PPL?
Thanks for help.

[SerializeField]
PostProcessingProfile CC;

if (Input.GetKeyDown(KeyCode.Mouse1))
{
CC.vignette.enabled = true;
CC.chromaticAberration.enabled = true;

Are you using URP and what Unity version are you using?

1 Answer

1

Most times you use the post processing steak by adding a “Post Processing” game object to your hierarchy with a Volume on it:

182503-screenshot-2021-06-23-124234.png

To disable all post processing effects, disable this game object.


Another Approach is to disable post processing on your camera under “Rendering”: