/// <summary> /// Called every frame if the script is enabled. /// </summary> private void Update() { if (PluginConfig.Instance.PTTEnabled) { ControllersHelper.UpdateEvents(); } }
public void OnApplicationStart() { //Harmony Harmony = new HarmonyLib.Harmony(HarmonyId); Harmony.PatchAll(Assembly.GetExecutingAssembly()); ControllersHelper.Init(); new GameObject("MicMuterController").AddComponent <MicMuterController>(); //Gameplay events to mute/unmute EventMute.Setup(); //Register mod settings menu button BSMLSettings.instance.AddSettingsMenu("MicMuter", "MicMuter.UI.ConfigView.bsml", ConfigView.instance); //Microphone device setup MicDeviceUtils.Setup(); }