Modify a float value

Hello, I’m trying for some time now to modify a float value from the new post processing profile but I can’t figure out how. I know i need to create a temporary variable but so far I’ve just used this for positions in which i used Vector3 but now i just need to modify a single float value. I’m trying the line below which is wrong of course. To avoid any confusion my question has nothing to do with the post processing script, i just want to know how to modify a float value that requires to be stored in a temporary variable.

PostProcessingProfileScript.bloom.settings.bloom.threshold -= new float (0.05f);

I think the reason that wouldn’t work is because you are using the -= modifier. I think you would do exactly what you said “store in a temporary variable” and then reassign it. So something like this:

float myFloat = PostProcessingProfileScipt.bloom.settings.bloom.thresholdPostProcessingProfileScipt.bloom.settings.bloom.threshold 
myFloat += .05f;
PostProcessingProfileScipt.bloom.settings.bloom.threshold = myFloat;

Are you using the PostProcessingStack v2? If the above doesn’t work let me know what variable you are trying to modify and I can try it out.

**EDIT: ** OH! I think I get it now. The float isn’t the thing that needs to be a temporary variable, it is either the settings, or the bloom class. My guess is the settings. So try creating a settings variable and saving the bloom.settings to it. Modify that, then assign it back. I don’t have PostProcessingProfileScipt in my project so I can’t test it.