Search Unity

Precomputed GI not loading on Async

Discussion in 'Global Illumination' started by petey, Mar 5, 2017.

  1. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Hi All,

    Just running into a bit of trouble with Precomputed GI. It seems that it doesnt work when I load a scene async.
    This is what it looks like when I load the scene and set it to active through a script (in Play mode) -

    This is just adding the scene in the editor and setting active (not in Play mode) -


    Any ideas what might be going wrong? It seems to update the ambient settings fine, just no GI...
    Thanks,
    Pete

    Oh and here's the code I'm using -
    Code (CSharp):
    1.     public IEnumerator LoadLevelNow(){
    2.         Scene LoadedENVScene = SceneManager.sceneCount > 1 ? SceneManager.GetSceneAt (1) : new Scene ();
    3.         if (LoadedENVScene.IsValid())SceneManager.UnloadScene(LoadedENVScene.name);
    4.         AsyncOperation LoadLev = SceneManager.LoadSceneAsync (LevelName, LoadSceneMode.Additive);
    5.         yield return LoadLev;//Wait for the level to load
    6.  
    7.         Scene LoadedScene = SceneManager.GetSceneByName(LevelName);
    8.         SceneManager.SetActiveScene(LoadedScene);
    9.         yield return null;
    10.     }
     
  2. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Does anyone have any tips on getting this to work?
     
  3. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
    when I was working on an android game, the GI (which was baked and not realtime GI) wasn't loading in the editor with scene additive loading, but it was there on the andoid executable. I don't know what's up with that, but have you tried to create an executable?
     
  4. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Thanks kalata!
    I'll give that a try.
    P.
     
  5. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
  6. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
    Great! I wish it worked in the editor too, cause it would make working on the project easier, but I cannot find info on that for now. Cheers!