VolumePatches.cs 758 B

1234567891011121314151617181920212223
  1. using Il2Cpp;
  2. using UnityEngine;
  3. namespace AudioMgr
  4. {
  5. /*
  6. [HarmonyLib.HarmonyPatch(typeof(GameAudioManager), "SetRTPCValue")]
  7. public class VolumeChanged
  8. {
  9. public static void Prefix(ref GameAudioManager __instance, ref uint rtpcID, ref float rtpcValue, ref GameObject go)
  10. {
  11. if (VolumeIDs.GetRtpcIDMaster() == rtpcID)
  12. {
  13. VolumeMaster.SetMasterVolume(rtpcValue/100);
  14. }
  15. else if (VolumeIDs.GetRtpcIDList().ContainsKey(rtpcID)) // Set sfx/voice/ambient/bgm
  16. {
  17. VolumeMaster.SetVolume(VolumeIDs.GetRtpcIDList()[rtpcID], rtpcValue/100);
  18. }
  19. }
  20. } */
  21. }