I'm trying to imitate a lightning effect in Unity using its post-processing stack's bloom effect via script (to modify the intensity), but somehow I'm unable to actually set anything via script.
PostProcessingProfile postProcProf;
postProcProf.bloom.settings.bloom.intensity =
Mathf.Lerp(data[i].Strength, data[i + 1].Strength, data[i].TimeToReachNext);
This is my code, but it says
Cannot modify the return value of BloomModel.Settings, because it is not a variable.
I have found no guide on how to script post-processing stack, only on how to use it from the editor.