diff --git a/game/Assets/Prefabs/PressurePlateDoor/Plate.prefab b/game/Assets/Prefabs/PressurePlateDoor/Plate.prefab
index 8782f74..50b328e 100644
--- a/game/Assets/Prefabs/PressurePlateDoor/Plate.prefab
+++ b/game/Assets/Prefabs/PressurePlateDoor/Plate.prefab
@@ -226,6 +226,7 @@ MonoBehaviour:
_resetDelay: -1
_objectTimeScale: {fileID: 11400000, guid: 9b68e167db44c0c42837e9a679da964e, type: 2}
_graphics: {fileID: 172610034636199716}
+ _sfx: event:/Environment/Interactables/Button
_onPress:
m_PersistentCalls:
m_Calls: []
diff --git a/game/Assets/Scripts/Audio/SFXTrigger.cs b/game/Assets/Scripts/Audio/SFXTrigger.cs
new file mode 100644
index 0000000..2a4a06b
--- /dev/null
+++ b/game/Assets/Scripts/Audio/SFXTrigger.cs
@@ -0,0 +1,25 @@
+using FMOD.Studio;
+using FMODUnity;
+using UnityEngine;
+using STOP_MODE = FMOD.Studio.STOP_MODE;
+
+public class SFXTrigger : MonoBehaviour
+{
+ [SerializeField]
+ [EventRef]
+ private string _sfx;
+
+ private EventInstance _sfxInstance;
+
+ void Awake()
+ {
+ _sfxInstance = RuntimeManager.CreateInstance( _sfx );
+ RuntimeManager.AttachInstanceToGameObject( _sfxInstance, transform, (Rigidbody)null );
+ }
+
+ public void Trigger()
+ {
+ _sfxInstance.stop(STOP_MODE.IMMEDIATE);
+ _sfxInstance.start();
+ }
+}
diff --git a/game/Assets/Scripts/Audio/SFXTrigger.cs.meta b/game/Assets/Scripts/Audio/SFXTrigger.cs.meta
new file mode 100644
index 0000000..1ad1b49
--- /dev/null
+++ b/game/Assets/Scripts/Audio/SFXTrigger.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ebda6b115fef23f4e8c4022e31ad6a79
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/game/Assets/Scripts/PressurePlate/PressurePlate.cs b/game/Assets/Scripts/PressurePlate/PressurePlate.cs
index 904b3d2..d413759 100644
--- a/game/Assets/Scripts/PressurePlate/PressurePlate.cs
+++ b/game/Assets/Scripts/PressurePlate/PressurePlate.cs
@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
+using FMODUnity;
using Ktyl.Util;
using UnityEngine;
using UnityEngine.Events;
@@ -11,6 +12,9 @@ public class PressurePlate : MonoBehaviour
[SerializeField] private float _resetDelay = -1f;
[SerializeField] private SerialFloat _objectTimeScale;
[SerializeField] private GameObject _graphics;
+ [SerializeField]
+ [EventRef]
+ private string _sfx;
public UnityEvent OnPress => _onPress;
[SerializeField] private UnityEvent _onPress;
@@ -28,7 +32,7 @@ public class PressurePlate : MonoBehaviour
{
triggered = Time.time;
_onPress.Invoke();
-
+ RuntimeManager.PlayOneShot( _sfx, transform.position );
_graphics.SetActive(false);
}
}
diff --git a/game/FMOD Project/Build/Desktop/Master.strings.bank b/game/FMOD Project/Build/Desktop/Master.strings.bank
index 0e62e60..5474295 100644
--- a/game/FMOD Project/Build/Desktop/Master.strings.bank
+++ b/game/FMOD Project/Build/Desktop/Master.strings.bank
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b9cf3c563d0b7a7663923b6f0a966404fabeee35da625fa95982f46f98d80b4e
-size 2612
+oid sha256:887a654482faef2ec53eed1846d4b2cb443dd7bcbe0dbbb01365d8986020e42e
+size 2648
diff --git a/game/FMOD Project/Build/Desktop/SFX.bank b/game/FMOD Project/Build/Desktop/SFX.bank
index 45335b8..487da9c 100644
--- a/game/FMOD Project/Build/Desktop/SFX.bank
+++ b/game/FMOD Project/Build/Desktop/SFX.bank
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:c39ff3489a1a29374429a0fde9be9ba71dc530377657fb54f2e0ddca1b965246
-size 4170016
+oid sha256:13cd27575fdefca8eb99c581a7e58feb25667b10a3ab95a3d25e9d533fc3e57f
+size 4184608
diff --git a/game/FMOD Project/Metadata/AudioFile/{a072221a-e880-42a8-9a1f-6018d84388f5}.xml b/game/FMOD Project/Metadata/AudioFile/{a072221a-e880-42a8-9a1f-6018d84388f5}.xml
new file mode 100644
index 0000000..6cb3673
--- /dev/null
+++ b/game/FMOD Project/Metadata/AudioFile/{a072221a-e880-42a8-9a1f-6018d84388f5}.xml
@@ -0,0 +1,20 @@
+
+
+
+
diff --git a/game/FMOD Project/Metadata/Event/{4a251740-3d73-49b0-8b5f-cbf8a6b7bab9}.xml b/game/FMOD Project/Metadata/Event/{4a251740-3d73-49b0-8b5f-cbf8a6b7bab9}.xml
new file mode 100644
index 0000000..305ecbc
--- /dev/null
+++ b/game/FMOD Project/Metadata/Event/{4a251740-3d73-49b0-8b5f-cbf8a6b7bab9}.xml
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+