Search Unity

Offsetting Scene Position for Dynamic Loading

Discussion in 'Editor & General Support' started by temp6532, May 19, 2019.

  1. temp6532

    temp6532

    Joined:
    Aug 15, 2017
    Posts:
    1
    I'm wondering if it's possible now to move an entire scene that contains static objects to create a seamless world.

    This is part of a 2D platformer and every scene will be baked and set up independent of each other. They are connected by doors which tell the game to load a specific scene. Works well so far, however, I need to offset the target scene's position so that the destination scene's corresponding door's position matches that of the origin scene's door.

    I've nested the scene's elements into 1 object so I could move that, but static objects and lightmaps cause an issue here.

    I know it's been asked before but I'm really hoping that the newer versions of unity have opened up the possibility of moving everything. I want to create a specific workflow that doesn't involve building the entire world in one scene, baking it, and splitting it up. I also don't want to manually position every scene to line up with the doors.

    Thank you.
     
  2. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    I think this needs to be seen. I'm trying to do an open world workflow akin to this myself, but it is proving difficult.


    Maybe the new environment system will address this issue, @Unity?
     
  3. FOXAcemond

    FOXAcemond

    Joined:
    Jan 23, 2015
    Posts:
    99
    I'm looking for the exact same thing. Please report here if you find a solution.

    The crazy thing with this problem is that I found a solution that works when launching in the editor but doesn't when launching a built game...

    I think it's because I'm moving objects too soon (in the Awake hook), meaning they move in the editor before actually loading the scene, which is impossible in a built game.
     
    Last edited: Jun 3, 2020
  4. FOXAcemond

    FOXAcemond

    Joined:
    Jan 23, 2015
    Posts:
    99
    My best bet now would be to write a script to extend the editor so that it offsets the scene on scene save and offsets back to 0 on scene load.
     
  5. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    I'm definitely curious how this might work -- I think something like this really might be the only way to go right now. D:
     
  6. seoyeon222222

    seoyeon222222

    Joined:
    Nov 18, 2020
    Posts:
    187
    Does anyone have a good solution for this?
    I haven't found a satisfactory answer yet.
    Is something different now?