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