Voiceline adding logic, fmod asset folder cleaning, fmod tweaks

This commit is contained in:
Timur Nizamov
2026-01-15 22:25:02 +02:00
parent 91275418e4
commit 641fe43472
278 changed files with 1450 additions and 280 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3ca33810cadcc3f438e1c22aef4b84e2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fdd84c412b9f8e54190abf5fb9d822e8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b95ea1a21a2515b428e818f2ba0071ab
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6a5c837d928416b468e7886bb15a44ea
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d6c33fb52eb7c5d48b88b1ce923918e4
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 659e5b6b771c6e84288fab70870e71ca
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a802a304ac7a06f4aa7ec3a5343ec6ca
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9d9d2a3944a244a4cb506fe9a06b6eab
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 45fe15686901bcf4d806b3fcfa9767af
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d0a0941231c25de4599a045b84fbbbe4
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 18de2bee3762c3d42aade5e9a1105f2d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 98d6925b0e4041d4cb810364c9e59186
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f20dfff913b4cf048ba81c8951e1d515
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0c63edcea3f1eb64aa4eaa0f9b65d4ec
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3dadebd0d94106b44a80fbcb1965d6de
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9270b2bbe46c8fe4fb76644cf9e0c2a2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b2c8a4e7715582b42a4b6eebff90743b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ee35784d923986c4c832e3a1c02f7ea9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 53dac4a8b4a6e5845b4ca1c859e81866
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 620343e30e35adf4aaf3fe1296540e0f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bf6d885db63d3a542b3dd07acc16fc3b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: fb8a9fcfd50369448a9535727e91be9a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 497e3485a60147a41a9a6df9ff32b6b6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8d725d2a72e75474da7b2012a77b2039
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3301bed657a92434fb8f62ac4bd61406
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d46684e8664c4ba4ba512f67e1c54310
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1ffe3d974ca4c4d45ae71410bd60ea1f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 634c2a7aac3130544aeae124c4c49bb0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -9,12 +9,12 @@ public class CarAudioController : MonoBehaviour
private void Awake()
{
Debug.LogError("AUDIO MANAGER:");
Debug.LogError(AudioManager.Instance);
Debug.LogError("FMOD EVENTS INSTANCE:");
Debug.LogError(FMODEvents.Instance);
Debug.LogError("Car Simple Driving:");
Debug.LogError(FMODEvents.Instance.BoltCarSimpleDriving);
//Debug.LogError("AUDIO MANAGER:");
//Debug.LogError(AudioManager.Instance);
//Debug.LogError("FMOD EVENTS INSTANCE:");
//Debug.LogError(FMODEvents.Instance);
//Debug.LogError("Car Simple Driving:");
//Debug.LogError(FMODEvents.Instance.BoltCarSimpleDriving);
carMovementInstance = AudioManager.Instance.CreateInstance(FMODEvents.Instance.CarModulatedDriving);
carStopInstance = AudioManager.Instance.CreateInstance(FMODEvents.Instance.BoltCarStopSound);

View File

@@ -184,8 +184,6 @@ public class TutorialAudioListener : MonoBehaviour
}
}
private void HandleGrab(XRGrabInteractable grab)
{
if (grab == null)

View File

@@ -63,11 +63,6 @@ public class AudioManager : MonoBehaviour
// public static AudioManager instance;
private static EventInstance musicEventInstance;
// ===== Dialogue / Programmer Sounds =====
[SerializeField]
private EventReference dialogueEvent;
private EVENT_CALLBACK dialogueCallback;
// public access for the Singleton
@@ -289,26 +284,47 @@ public class AudioManager : MonoBehaviour
//=====//
//=====//
public void PlayDialogue(string audioTableKey)
public void PlayDialogue(string audioTableKey, GameObject emitter = null)
{
if (!dialogueEvent.IsNull)
{
EventInstance instance = RuntimeManager.CreateInstance(dialogueEvent);
// Pin the string so FMOD can read it safely
GCHandle stringHandle = GCHandle.Alloc(audioTableKey);
instance.setUserData(GCHandle.ToIntPtr(stringHandle));
var dialogueEvent = FMODEvents.Instance.VoiceoverAll;
instance.setCallback(dialogueCallback);
instance.start();
instance.release();
}
else
if (dialogueEvent.IsNull)
{
Debug.LogWarning("Dialogue EventReference is not assigned!");
return;
}
EventInstance instance = RuntimeManager.CreateInstance(dialogueEvent);
if (emitter != null)
{
RuntimeManager.AttachInstanceToGameObject(instance, emitter);
instance.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(emitter.gameObject));
}
// Pin the key for programmer sound callback
GCHandle stringHandle = GCHandle.Alloc(audioTableKey);
instance.setUserData(GCHandle.ToIntPtr(stringHandle));
// Set the callback for programmer sounds
instance.setCallback(dialogueCallback);
// Add occlusion if available on the emitter
if (emitter != null)
{
FirstPersonOcclusion occlusion = emitter.GetComponent<FirstPersonOcclusion>();
if (occlusion != null)
{
occlusion.InitialiseWithInstance(instance);
}
}
instance.start();
instance.release();
}
[AOT.MonoPInvokeCallback(typeof(EVENT_CALLBACK))]
private static FMOD.RESULT DialogueEventCallback(
EVENT_CALLBACK_TYPE type,

View File

@@ -3,6 +3,9 @@ using UnityEngine;
public class FMODEvents : MonoBehaviour
{
[field: Header("Voiceline FMOD Programmer Event")]
[field: SerializeField] public EventReference VoiceoverAll { get; private set; }
[field: Header("Musical Ambiences")]
[field: SerializeField] public EventReference Kosmos { get; private set; }
@@ -19,7 +22,7 @@ public class FMODEvents : MonoBehaviour
[field: SerializeField] public EventReference BowGrab { get; private set; }
[field: SerializeField] public EventReference Spray { get; private set; }
[field: SerializeField] public EventReference Coughing { get; private set; }
[field: SerializeField] public EventReference MyNewSoundEffect { get; private set; }
//[field: SerializeField] public EventReference MyNewSoundEffect { get; private set; }
[field: Header("CAR")]
[field: SerializeField] public EventReference DoorOpen { get; private set; }

View File

@@ -0,0 +1,13 @@
using UnityEngine;
public class VoiceoverTester : MonoBehaviour
{
//[Tooltip("Audio Table key")]
public string dialogueKey = "Professor/Madis_Printing2";
private void OnTriggerEnter(Collider other)
{
AudioManager.Instance.PlayDialogue(dialogueKey, gameObject);
//Debug.LogError("Voiceline played (in 3D)");
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e77f6976a4505294797905646ff02a8a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More