Search Unity

Checking if Dynamic GI update has been scheduled?

Discussion in 'Global Illumination' started by MikkoK-HS, Sep 11, 2019.

  1. MikkoK-HS

    MikkoK-HS

    Joined:
    Sep 26, 2017
    Posts:
    27
    Is there a way to check if an update of the real-time global illumination has been scheduled and/or when one has been completed? I know there is DynamicGI.isConverged, but that only tells me if an update is going on right now.

    For example after changing materials it takes a few frames before DynamicGI.isConverged becomes false. If I update reflection probes immediately after changing materials, sometimes they'll capture a false view of the scene as the GI update hasn't happened yet.

    I guess I could just keep checking every frame if isConverged becomes false and then fire an event or something once it becomes true again but that doesn't feel very efficient. Is there a better way?
     
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,089