Setting Lift-Gamma-Gain values from C# script? (URP, Post-Processing v2)

So I want to change values of a “Lift Gamma Gain” element located in a volume profile asset.
There is a major problem though. I have been unable to find code reference for doing that and I am uncertain whether the change from code is even possible.
The value I’m mostly intereseted in is gain.
Is there any way to change that from my script? Thanks beforehands :slight_smile:

This shows how to change the “alpha” portion of the Gamma (the slider at the bottom of the gamma section when you look at it in the inspector). You should be able to figure out the rest from it - the color-wheel colors are just the x/y/z parts of the Vector4.

public class LiftGammaGainController : MonoBehaviour
{

    public static LiftGammaGainController instance;

    [HideInInspector] public Volume renderingVolume;
    LiftGammaGain liftGammaGain;

    private void Awake() {
        instance = this;
        renderingVolume = GetComponent<Volume>();
        if (!renderingVolume.profile.TryGet(out liftGammaGain)) throw new System.NullReferenceException(nameof(liftGammaGain));
    }

    public void SetGammaAlpha(float gammaAlpha) {
        liftGammaGain.gamma.Override(new Vector4(1f, 1f, 1f, gammaAlpha));
    }

    public float GetGammaAlpha() { return liftGammaGain.gamma.value.w; }
   

}