Changing parameters through scripting on Unity’s post processing stack V2.

For my PhD thesis I need to write an image effect that lets me configure a lens on a screen. In the calibration phase I need to modify the Image effect values through scripting.

To my surprise; there is a tutorial for doing changes in V1 that you can check here or in a forum post here but for V2 there where no guides.

Luckily enough, the forum post gave helped me out getting started to modify values on the Post Processing stack V2.


So lets say you have an image effect called “PitchTestImgEffect.cs”

Easy enough, my image effect has 2 float values and a texture as you can see here:


















What we need to do is to access the PostProcessVolume and get the PostProcessEffectSettings that contains our “PitchTestImgEffect” class, then we can modify its settings :-).

So with this script we can access the value of the pitch and set a value to it:

Hopefully this helps you out :). If it helped you, drop me a line and let me know.

2 Responses to “Changing parameters through scripting on Unity’s post processing stack V2.”

  1. Juan Sebastian says:

    I haven’t checked that code in a while. But if you dig inside the classes it should be easy to find. That’s how I came up with this post. By checking the code. Hope it helps 🙂

  2. Wootu says:

    I would like to ask how do you set active depthoffield to on and off when you click on a button?