Beispiel #1
0
        public void OnApplicationStart()
        {
            if (_init)
            {
                return;
            }
            _init    = true;
            Instance = this;

            _harmony = new Harmony("com.brian91292.beatsaber.cameraplus");
            try {
                _harmony.PatchAll(Assembly.GetExecutingAssembly());
            } catch (Exception ex) {
                Logger.Log($"Failed to apply harmony patches! {ex}", LogLevel.Error);
            }

            SceneManager.activeSceneChanged += this.OnActiveSceneChanged;
            // Add our default cameraplus camera
            CameraUtilities.AddNewCamera(Plugin.MainCamera);
            CameraProfiles.CreateMainDirectory();

            _profileChanger        = new ProfileChanger();
            MultiplayerSessionInit = false;
            Logger.Log($"{Plugin.Name} has started", LogLevel.Notice);
        }