Hi! I’m trying to figure out how to get my SettingsMenu script to turn on and off the MotionBlur effect on my Post Processing Volume, however i’m not sure what to do and after trying out in-game it doesn’t seem to toggle it on or off when I inspect the volume, and doesn’t give any errors in the console either, could I get some help to figure this out? Thanks!
public PostProcessVolume volume;
MotionBlur motionBlurLayer;
public Toggle MBlurToggle;
public void Update()
{
if (MBlurToggle.isOn == true)
{
PlayerPrefs.SetInt("MBtoggle", 0);
volume.profile.TryGetSettings(out motionBlurLayer);
motionBlurLayer.active = MBlurToggle;
}
else
{
PlayerPrefs.SetInt("MBtoggle", 1);
volume.profile.TryGetSettings(out motionBlurLayer);
motionBlurLayer.active = MBlurToggle;
}
}