Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Accessing HDRP light parameters via script

Discussion in 'Graphics Experimental Previews' started by supaworst, May 19, 2019.

  1. supaworst

    supaworst

    Joined:
    Mar 26, 2012
    Posts:
    25
    Hello,

    as the title says i'd like to understand how to access to HDRP light parameters through code.

    In my specific case, i want to modify via script the length of a tube light but i can't find any documentation about it. In fact, all the current API refers to the standard lighting that has no tube shape.

    I have no clues about it, could somebody help me please?

    Thanks in advance
     
    CortiWins likes this.
  2. supaworst

    supaworst

    Joined:
    Mar 26, 2012
    Posts:
    25
    Ok, no problem, i've figured out how to do it.
    Just take the light as a normal game object and get the component "HDadditionalLightData".

    I hope it could be useful for somebody.
     
    michalzatorski95 and CortiWins like this.
  3. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    38
    Like for sharing the solution.