Search Unity

Scene dublicates

Discussion in 'Editor & General Support' started by undyingwill, Jun 23, 2017.

  1. undyingwill

    undyingwill

    Joined:
    Feb 3, 2016
    Posts:
    92
    Hi, I have made a scene which should change little bit when player finish the level.
    If I make 10-20 scenes, the final app will be 2-3GB. Is there any way to bake scene or something?

    example: scene 1 - full level
    scene 2 - same level + some items or without some items

    player finish the level 1 = change scene to level 2
     
  2. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    It sounds like what you want is to load the scene additively - by doing this:

    SceneManager.LoadScene("SceneName", LoadSceneMode.Additive); (or LoadSceneAsync).

    For that, you'll loaf your base level like normal, then load an additional level additively that only includes the new things to add to the base level. Then when the player is done with that level, you can call SceneManager.UnloadSceneAsync on the one you added to it to unload those changes, then additively load the next level changes. There isn't a "Subtractive", so to remove some items you'll have to do that yourself manually.
     
  3. undyingwill

    undyingwill

    Joined:
    Feb 3, 2016
    Posts:
    92
    Hmm, but when I build app I have to choose all the scenes (even if they are same with little changes) and that will increase x10 the final size.
     
  4. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    My point was all those little scenes would only include the changes, not the whole level. When you load a level additively, it adds the level you are loading to the level that’s already been loaded. So, load the base level - this one has lots of stuff. Then load just the new things for the current level. All those levels that are just the new things should be quite small.
     
  5. undyingwill

    undyingwill

    Joined:
    Feb 3, 2016
    Posts:
    92
    I've seen alot of games, that work like that and are 100-150mb..
    I mean when the player find something, scene changes and other item appear somewhere + some walls are different or does not exist.

    With your method I can add, but cant remove.

    There is no bake level for reducing megabytes like baking lights?