Search Unity

Question [HDRP]How to change exposure via script

Discussion in 'High Definition Render Pipeline' started by GlenZPS, Jun 28, 2021.

  1. GlenZPS

    GlenZPS

    Joined:
    Sep 12, 2019
    Posts:
    25
    I tried to use VolumeProfile.TryGet<Exposure>(out exposure) and use exposure.fixedExposure = new FloatParameter(_exposure, true), the number in the inspector has changed, but the exposure in game stayed the same, it's like the exposure doesn't refresh in-game, what is the problem?
     
  2. GlenZPS

    GlenZPS

    Joined:
    Sep 12, 2019
    Posts:
    25
    Ok, figured it out, the old "exposure.fixedExposure = new FloatParameter(_exposure, true)" is deprecated, now use "exposure.fixedExposure.value = _exposure" instead
     
  3. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    You can find example in the documentation of what you are trying to do.

    The example is with a boolean but the logic is the same with a float for example.