protected virtual void Awake() { // get available components _cameraManagers = GetComponents <ICameraManager>().ToList(); _windowSystems = GetComponents <IPresentationSystem>().ToList(); // get child diagram manager object _diagramManager = GetComponent <DiagramManager>(); // enable the first diagram manager, ensure all others are disabled if (_cameraManagers.Count > 0) { for (int i = 0; i < _cameraManagers.Count; i++) { if (i == 0) { _cameraManagers[i].Enable(); _currentCameraManager = _cameraManagers[i]; } _cameraManagers[i].Disable(); } } else { Debug.LogWarning("MainManager does not have any camera managers, the user will be unable to control the camera"); } // enable the first window manager, ensure all others are disabled if (_windowSystems.Count > 0) { for (int i = 0; i < _windowSystems.Count; i++) { if (i == 0) { _windowSystems[i].Enable(); _currentWindowSystem = _windowSystems[i]; } _windowSystems[i].Disable(); } } else { Debug.LogWarning("MainManager does not have any window systems, any window presenters in the scene will not be presented"); } }
private void SetWindowSystem(IPresentationSystem newWindowSystem) { _currentWindowSystem.Disable(); _currentWindowSystem = newWindowSystem; _currentWindowSystem.Enable(); }