HapticFeedbackPatch.cs 951 B

1234567891011121314151617181920212223
  1. using HarmonyLib;
  2. using Libraries.HM.HMLib.VR;
  3. using UnityEngine.XR;
  4. namespace BeatSaberTweakers.HapticFeedbackAdjust.HarmonyPatches
  5. {
  6. //// **virtual** void PlayHapticFeedback(XRNode node, HapticPresetSO hapticPreset)
  7. //[HarmonyPatch(typeof(HapticFeedbackController))]
  8. //[HarmonyPatch("PlayHapticFeedback")]
  9. //[HarmonyPatch(new[] { typeof(XRNode), typeof(HapticPresetSO) })]
  10. //internal static class HapticFeedbackPatch
  11. //{
  12. // static bool PreFix(HapticFeedbackController __instance, XRNode node,ref HapticPresetSO hapticPreset)
  13. // {
  14. // Plugin.Logger.Debug("PlayHapticFeedback:" + node + ", s:" + hapticPreset._strength + ", d:" + hapticPreset._duration + ", f:" + hapticPreset._frequency);
  15. // var copy = new HapticPresetSO();
  16. // copy.CopyFrom(hapticPreset);
  17. // copy._strength *= 3;
  18. // hapticPreset = copy;
  19. // return false;
  20. // }
  21. //}
  22. }