Search Unity

Question Reflection Probes don't affect scenes when additive loading is used. (Solved)

Discussion in 'High Definition Render Pipeline' started by tr_lineas, Mar 4, 2020.

  1. tr_lineas

    tr_lineas

    Joined:
    Feb 27, 2018
    Posts:
    14
    Stumbled upon a bug.

    When loading a scene via

    Code (CSharp):
    1. SceneManager.LoadScene(buildId, LoadSceneMode.Additive);
    which contains baked reflection probes those probes don't affect the scene. Every material uses the fallback (sky) reflection probe. If you select one reflection probe in the hierarchy while in Play-Mode all reflection probes suddenly contribute to the scene though.

    I tried to disable/enable the reflection probes via script after the scene is loaded but it has no effect.

    Does anyone has the same problem and/or workaround?

    Unity: 2019.3.3f1
    HDRP: 7.1.8
     
  2. tr_lineas

    tr_lineas

    Joined:
    Feb 27, 2018
    Posts:
    14
    Found a solution in case anyone has the same problem:

    After loading the scene containing the reflection probes you have to set the scene as the active scene:

    Code (CSharp):
    1. SceneManager.SetActiveScene(SceneManager.GetSceneByBuildIndex(buildIndex));
     
    tianoppo and icyuan like this.