Пример #1
0
        void Awake()
        {
            VRCModLogger.Log("[ModComponent] Awake called");
            DontDestroyOnLoad(gameObject);
            Instance = this;

            try
            {
                ModManager.LoadMods();
            }
            catch (Exception e)
            {
                VRCModLogger.Log("An error occured while loading mods: " + e);
            }

            mods = new CompositeModCaller(ModManager.ModControllers);
            mods.OnApplicationStart();

            SceneManager.sceneLoaded += (scene, method) =>
            {
                VRCModLogger.Log("[ModComponent] Scene Loaded: " + scene.name);
                if (scene.name == "ui")
                {
                    StartCoroutine(StartVRModules());
                }
            };
        }
Пример #2
0
        void Awake()
        {
            VRCModLogger.Log("[ModComponent] Awake called");
            DontDestroyOnLoad(gameObject);
            Instance = this;

            if (VRCToolsUpdater.CheckForVRCToolsUpdate())
            {
                VRCToolsUpdater.SheduleVRCToolsUpdate();
            }
            else
            {
                mods = new CompositeModCaller(ModManager.ModControllers);
                mods.OnApplicationStart();
            }
        }