Пример #1
0
 public static void displayNeighbors()
 {
     AtlasSceneManager.getSceneData();
     AtlasSceneManager.getNeighbors();
     loadScene();
     displayingNeighbors = true;
 }
Пример #2
0
    static void loadScene()
    {
        List <AtlasScene> neighbors    = AtlasSceneManager.getNeighbors();
        AtlasScene        currentScene = AtlasSceneManager.getScene();

        foreach (AtlasScene n in neighbors)
        {
            if (n.scene != "null")
            {
                EditorSceneManager.OpenScene("Assets/Scenes/WorldMap/" + n.scene + ".unity", OpenSceneMode.Additive);
                Vector2 d = (n.size + currentScene.size) * 0.5f;
                Vector2 t = (n.getCenter() - currentScene.getCenter());
                shiftScene(n.scene, t.x, -t.y);
            }
        }
    }