Esempio n. 1
0
    void SetActiveScene(Scene scene)
    {
        _currentSceneController?.Deactivate();
        _current = scene;

        SceneManager.SetActiveScene(scene);
        scene.GetRootGameObjects(_currentObjects);
        _currentSceneController = _currentObjects.Find(IsSceneController).GetComponent <ISceneController>();
        _currentSceneController.Activate();
    }