Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Simultaneous work with two independent scenes

Discussion in 'World Building' started by abaji, Nov 26, 2022.

  1. abaji


    Sep 3, 2022

    I have an open seamless world, a map of this world is built from rectangular blocks, data about the position and type of blocks is stored as data.

    The gameplay is built from 2 parts:

    "Main gameplay" - The character can move around the world (isometric view), pieces of the map are loaded only when they are needed. The block that the hero is on and all the blocks around (Blocks are relatively spacious areas on which the hero can move, for example 100 by 100 meters)

    "Global Map" - The player can open a global map, which is built based on the same map data as in the first case, but the prefabs for construction will be different, much more simplified with fewer objects (this global map will be stored in a separate scene, and this scene will always be loaded)
    This scene is used not only as a map, but also the player can place buildings on it and do some other things with existing buildings.

    Main question:
    The time has come to combine these two parts.
    How to implement the ability to simultaneously see and interact with these two parts?
    That is, in other words, during the "main gameplay", I want to turn on the window with the map window (for example, in the center or half of the screen) and at the same time continue to run using WASD and without stopping the hero, put the building in the "global map" window with the mouse, and then close the map so that it does not interfere.

    One of the problems is that although these parts are in different scenes, they form the same space if loaded at the same time (as far as I understand, there is no way to load them into separate spaces, correct me if I misunderstand). In other words, I would not like to see a piece of the map in the "main gameplay".

    At the moment, the best thing I have thought of is to use different layers, and two cameras, each will see only its part. (probably I will also have to separate them in the collision matrix)

    I'm still a novice Unity user. Are there any other options or tips for resolving this issue?

    Additional question:
    Now in my "main gameplay" part, the blocks are prefabs, but probably in the future I will use multiscene loading (Additive mode), each block will be a separate scene.
    And since all the block scenes will start at zero coordinates, the question is how to move the entire contents of the scene to the position I need when loading?
    (to line up their positions according to the map data)

    Thank you for your attention
  2. kdgalla


    Mar 15, 2013
    Can you see both maps simultaneously? Is the global map in a separate window/UI maybe? In any case, you can have both maps in the same place but put them on different layers and render them separately.