How to disable/enable post processing effects via script

Hey guys, im trying to make a toggle that can enable or disable post processing effects via script.
Any help? I tried doing it but it didn’t work

How to report problems productively in the Unity3D forums:

http://plbm.com/?p=220

i only wanted to know how to disable or enable post processing effects via a toggle T_T

We have 4 different post processing system at the moment (pp1 and pp2 for the built in and two built in the URP and HDRP), which one? What have you tried so far, show us!

1 Like

I have tried PP2 with the standard pipe line. Heres what i tried doing

        private void BlurChanged(bool isOn)
        {
            motionblur.enabled.value = enabled;
            Save();
        }

That is AWESOME! Now… if you had a problem with it not working, review my post above:

  • what did YOU expect it to do exactly
  • what did/does it do EXACTLY
  • describe (using proper unity terms) what you have set up and connected together
  • using Debug.Log() to print values, what have YOU found out? Is the code called? Is the value on or off? etc.

After having made eight (8!!!) separate posts about this, you have still obstinately refused to give us anything that can help us help you.

2 Likes

I expect it to turn off or on the post processing effect
It didn’t do anything
I made a post processing volume with all the effects that the script has.
I will try using debug.log

I have not made 8 posts, 3 posts, 3, Where did you see 8 posts?

Yeah that is the behavior I mentioned I saw in one of your other 3 (8 :stuck_out_tongue: ) threads. I’d still suggest creating a specific motion blur only post processing volume, and try enabling/disabling the entire volume. You can have multiple volumes running at the same time, and they will combine their effects. Don’t include motion blur in any of the other active post processing volumes to make is easier to verify it is working.

So i make post processing profiles and each has only one effect and then i go the script and disable/activate the post processing profiles that has the effect motion blur or bloom?

This worked for me