void Awake()
        {
            DontDestroyOnLoad(gameObject);

            bsPlugins = new CompositeBSPlugin(PluginManager.BSPlugins);
#pragma warning disable CS0618 // Type or member is obsolete
            ipaPlugins = new CompositeIPAPlugin(PluginManager.Plugins);
#pragma warning restore CS0618 // Type or member is obsolete

            gameObject.AddComponent <Updating.ModSaber.Updater>();

            bsPlugins.OnApplicationStart();
            ipaPlugins.OnApplicationStart();

            SceneManager.activeSceneChanged += OnActiveSceneChanged;
            SceneManager.sceneLoaded        += OnSceneLoaded;
            SceneManager.sceneUnloaded      += OnSceneUnloaded;

            foreach (var provider in PluginManager.configProviders)
            {
                if (provider.Key.HasChanged)
                {
                    try
                    {
                        provider.Key.Save();
                    }
                    catch (Exception e)
                    {
                        Logging.Logger.log.Error("Error when trying to save config");
                        Logging.Logger.log.Error(e);
                    }
                }
            }
        }
Beispiel #2
0
        void Awake()
        {
            DontDestroyOnLoad(gameObject);

            bsPlugins = new CompositeBSPlugin(PluginManager.BSMetas);
#pragma warning disable 618
            ipaPlugins = new CompositeIPAPlugin(PluginManager.Plugins);
#pragma warning restore 618

            gameObject.AddComponent <Updating.BeatMods.Updater>();

            bsPlugins.OnApplicationStart();
            ipaPlugins.OnApplicationStart();

            SceneManager.activeSceneChanged += OnActiveSceneChanged;
            SceneManager.sceneLoaded        += OnSceneLoaded;
            SceneManager.sceneUnloaded      += OnSceneUnloaded;

            Config.Config.Save();
        }
        void Awake()
        {
            DontDestroyOnLoad(gameObject);

            bsPlugins = new CompositeBSPlugin(PluginManager.BSMetas);
#pragma warning disable 618
            ipaPlugins = new CompositeIPAPlugin(PluginManager.Plugins);
#pragma warning restore 618

            /* kill this for now, until theres a new system */
            //gameObject.AddComponent<Updating.ModSaber.Updater>();

            bsPlugins.OnApplicationStart();
            ipaPlugins.OnApplicationStart();

            SceneManager.activeSceneChanged += OnActiveSceneChanged;
            SceneManager.sceneLoaded        += OnSceneLoaded;
            SceneManager.sceneUnloaded      += OnSceneUnloaded;

            Config.Config.Save();
        }