Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spacepluk/df0d341801571409b1fed332e2084665 to your computer and use it in GitHub Desktop.
Save spacepluk/df0d341801571409b1fed332e2084665 to your computer and use it in GitHub Desktop.
From 2e7bb8e6f5ff6dd1b4815d6ee3e02c68e044078f Mon Sep 17 00:00:00 2001
From: Oscar Morante <oscar@mooistudios.com>
Date: Tue, 5 Oct 2021 13:02:58 +0200
Subject: [PATCH] add option to ignore sound durations to MMFeedbackSound
---
.../MMFeedbacksForThirdParty/MMTools/MMFeedbackSound.cs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Assets/Feel/MMFeedbacks/MMFeedbacksForThirdParty/MMTools/MMFeedbackSound.cs b/Assets/Feel/MMFeedbacks/MMFeedbacksForThirdParty/MMTools/MMFeedbackSound.cs
index c25d9924..f19a6ba7 100644
--- a/Assets/Feel/MMFeedbacks/MMFeedbacksForThirdParty/MMTools/MMFeedbackSound.cs
+++ b/Assets/Feel/MMFeedbacks/MMFeedbacksForThirdParty/MMTools/MMFeedbackSound.cs
@@ -31,6 +31,7 @@ namespace MoreMountains.Feedbacks
/// the sound clip to play
[Tooltip("the sound clip to play")]
public AudioClip Sfx;
+ public bool IgnoreDuration = true;
[Header("Random Sound")]
/// an array to pick a random sfx from
@@ -151,6 +152,8 @@ namespace MoreMountains.Feedbacks
protected virtual float GetDuration()
{
+ if (IgnoreDuration) return 0f;
+
if (Sfx != null)
{
return Sfx.length;
--
2.31.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment