Search Unity

Scenemanagement loadlevel and Enlighten

Discussion in 'Editor & General Support' started by Deleted User, Feb 13, 2018.

  1. Deleted User

    Deleted User

    Guest

    Hi,
    i don´t get it.

    Scenario: I am planning to have a rather empty app. Content will be loaded from online via Assetbundles.
    Some Assetbundles hold just 3Dmodels and Shaders, but others hold a whole scene including lighting information. This involves having skydomes, all the baking info such as light maps, reflection maps etc.

    So i have my base app. I t downloads a JSON file with references to assetbundles. All this works.
    I planned to have a some rather empty scenes in the base app. Only holding a camera and scripts to additionally load a bundle with a complete scene. Those two scenes should merge. (Its a VR App targeting Cardboard for now). The main apps scene has a special camera setup for VR (having a reticle and scripts for VR) but absolutely no lighting info - as there is nothing.

    It loads successfully a bundle with full lighting info (and on top of that Postprocessing stack v2).
    However after loading this, i have of course two cameras. The one from main scene and then a new one from the loaded scene (which holds the post processing stuff)

    Problem: i cannot get the lighting info from the bundle scene to take over.
    If i load it with LoadSceneMode.Single -> Yes then the lighting info and skydome are there. But of course my VR Camera is lost as the calling scene gets deleted.

    If i load it with LoadSceneMode.Additive -> Then the lighting info might be there, but defiantly not the skydome associated to the bundles lighting info.

    I also tried merging the scenes and find Cameras - then delete the one or the other camera.
    But no matter what i do, something breaks. Either i have no sikydome from the asset bundle and no lighting info from it as well as no Postprocessing - or i have it but los my VR Camera.

    In short: I lack the understandanding of loading Scenes additionally and decide which scenes lighting info to use and how,


    Sounds complicated? Yes it is.


    And no, i don´t want to put everything in one project - the planned project would be to huge and only asset bundles could help.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847