Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

HDAdditionalLightData.LateUpdate

Discussion in 'High Definition Render Pipeline' started by garryjnewman, Sep 27, 2019.

  1. garryjnewman

    garryjnewman

    Joined:
    Sep 11, 2015
    Posts:
    33
    Conventional wisdom to make high performance code in Unity is to avoid using things like Update/LateUpdate on objects that you have a lot of..

    82dd9345-a356-4ed5-b7cc-564039d84cd2.png

    Is this okay?
     
    DavidDreamer likes this.
  2. antoinel_unity

    antoinel_unity

    Unity Technologies

    Joined:
    Jan 7, 2019
    Posts:
    257
    Hello,

    It's a workaround we made to make HDRP lights compatible with timeline inside the editor. There should be no overhead in build except if there is an animation on the light.
    So i'd say that we currently don't have the choice of doing that inside the editor if we want to support timeline. We are working on a proper solution to replace this hack but we don't know the ETA yet.
     
    DavidDreamer likes this.
  3. garryjnewman

    garryjnewman

    Joined:
    Sep 11, 2015
    Posts:
    33
    Thanks, there's also one in DecalProjector. I know these guys are nothing on their own, but when you have 500 of them it's 0.4ms of a frame - so that ends up being quite detrimental.
     
    radiantboy likes this.
  4. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    did this change yet? im on 2021.2.16 and have absolutely hundreds of calls to this.
     
  5. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,068
    By animation you mean some kind of unity build in system like Animator or Timeline Track ?
    Or manually doing "animation" by changing light parameters in "void Update()/FixedUpdate" also counts.

    In my case I have got 629 calls and it eats 7.86ms it's about 9% of Total.