Editing Post Processing Volume Thru a Script (Unity 2019)

I’ve made an options menu, and I’m trying to get MotionBlur to turn off when, I enter the game. I’m tryna do something like this… Any help?

public PostProcessVolume volume;

void start() {
    volume.getComponent<MotionBlur>.enabled = false;

Any help, thanks!

bump?

try this…

  private void UpdateMotionBlur(Volume volume, bool active)
  {
    volume.profile.TryGet<MotionBlur>(out MotionBlur motionBlur);
    if (motionBlur != null)
    {
      motionBlur.active = active;
    }
  }

Edit: simplified the above

Thank you so so much! O had gotten something remotley close to working (one line) but it didn’t work because I used GetCOmponent<>(), this works great! Thanks!!

1 Like