public static void OnLoad() { if (Instance) { return; } Instance = new GameObject("Mirror").AddComponent <MirrorController>(); }
protected override void DidActivate(bool firstActivation, ActivationType activationType) { MainScreen = GameObject.Find("MainScreen"); MainScreenPosition = MainScreen.transform.position; if (firstActivation) { _contentViewController = BeatSaberUI.CreateViewController <AvatarPreviewController>(); _leftViewController = BeatSaberUI.CreateViewController <AvatarSettingsViewController>(); _rightViewController = BeatSaberUI.CreateViewController <AvatarListViewController>(); title = OnContentCreated(_rightViewController); } if (activationType == FlowCoordinator.ActivationType.AddedToHierarchy) { ProvideInitialViewControllers(_contentViewController, _leftViewController, _rightViewController); MirrorController.OnLoad(); MainScreen.transform.position = new Vector3(0, -100, 0); // "If it works it's not stupid" - Caeden117 _rightViewController.onBackPressed += backButton_DidFinish; } }