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()); } }; }
void OnDestroy() { try { ModComponent.Create(); } catch (Exception e) { VRCModLogger.LogError(e.ToString()); } }
void Awake() { VRCModLogger.Log("[ModComponent] Awake called"); DontDestroyOnLoad(gameObject); Instance = this; if (VRCToolsUpdater.CheckForVRCToolsUpdate()) { VRCToolsUpdater.SheduleVRCToolsUpdate(); } else { mods = new CompositeModCaller(ModManager.ModControllers); mods.OnApplicationStart(); } }
private static void Bootstrapper_Destroyed() { ModComponent.Create(); }