Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Accessing HDRP light properties in scripts?

Discussion in 'High Definition Render Pipeline' started by Aaron-Meyers, Feb 10, 2020.

  1. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    251
    I'm looking for a way to access some of the HDRP light properties via script and they don't seem to be exposed on the standard Light class. I'd expect at the very least to be able to control the "Dimmer" property, but maybe more?
     
  2. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    252
    Some of the new lighting parameters are not part of the built-in light component.
    You need

    using UnityEngine.Rendering.HighDefinition;


    and then get the new lighting component:

    public HDAdditionalLightData hdLightData;


    or

    GetComponent<HDAdditionalLightData>();
     
    Aaron-Meyers likes this.
  3. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    251
    perfect that's exactly what i was looking for. thank you!
     
unityunity