Merge branch 'audio'

This commit is contained in:
2025-10-17 14:38:53 +02:00
15 changed files with 263 additions and 3 deletions

View File

@@ -452550,6 +452550,10 @@ PrefabInstance:
propertyPath: m_Name
value: QuarryAudio
objectReference: {fileID: 0}
- target: {fileID: 7585931024614860467, guid: ead4e790fa3a1924ebd1586c93cd5479, type: 3}
propertyPath: m_PlayOnAwake
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []

View File

@@ -138,6 +138,8 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 2873907538289469479}
- component: {fileID: 8545106365577783398}
- component: {fileID: 7585931024614860467}
m_Layer: 0
m_Name: QuarryAudio
m_TagString: Untagged
@@ -162,6 +164,121 @@ Transform:
- {fileID: 4121215864022656322}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8545106365577783398
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6199677512542707633}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cb5c6632b7606ce43a0b2dbf11215dc8, type: 3}
m_Name:
m_EditorClassIdentifier: '::'
narratorAudioSource: {fileID: 9091997474527205907}
firstNarration: {fileID: 8300000, guid: d0a13dd948bacda48be267eec3e0b080, type: 3}
anneLiseExposition: {fileID: 0}
narrationFinished:
m_PersistentCalls:
m_Calls: []
--- !u!82 &7585931024614860467
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6199677512542707633}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &6350035581257276269
GameObject:
m_ObjectHideFlags: 0
@@ -173,7 +290,7 @@ GameObject:
- component: {fileID: 2279651898552875333}
- component: {fileID: 9091997474527205907}
m_Layer: 0
m_Name: Narrator
m_Name: Narrator1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -205,8 +322,8 @@ AudioSource:
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 3533147658878909314, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 8300000, guid: d0a13dd948bacda48be267eec3e0b080, type: 3}
m_PlayOnAwake: 1
m_Resource: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0

View File

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

View File

@@ -0,0 +1,15 @@
using UnityEngine;
public class AnneLiseMain : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
void PlayIntroVO()
{
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f8fad2d7a81d63b45aad87edfd322669

View File

@@ -0,0 +1,35 @@
using UnityEngine;
using UnityEngine.Audio;
using AudioSourceEvents;
using System;
using UnityEngine.Events;
public class NarratorVO : AudioSourceObserver
{
public AudioSource narratorAudioSource;
public AudioResource firstNarration;
public UnityEvent narrationFinished;
private IAudioEventSource _eventSource;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
PlayNarrationAudio();
}
void PlayNarrationAudio()
{
_eventSource = narratorAudioSource.RequestEventHandlers();
_eventSource.AudioStopped += NarrationFinished;
narratorAudioSource.resource = firstNarration;
narratorAudioSource.Play();
}
private void NarrationFinished(object sender, EventArgs e)
{
narrationFinished.Invoke();
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: cb5c6632b7606ce43a0b2dbf11215dc8

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: f189b8a044a8ae94fb38d99dbfc7deed
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 195905675bf639f458a88f7567a3adc1
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 3f542c523460c5148a53ca2d5476a545
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,6 @@
{
"dependencies": {
"com.moolt.packages.net": "git+https://github.com/Moolt/UnityAudioSourceEvents?path=Packages/AudioSourceEvents",
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.spriteshape": "12.0.1",
"com.unity.addressables": "2.7.3",

View File

@@ -1,5 +1,12 @@
{
"dependencies": {
"com.moolt.packages.net": {
"version": "git+https://github.com/Moolt/UnityAudioSourceEvents?path=Packages/AudioSourceEvents",
"depth": 0,
"source": "git",
"dependencies": {},
"hash": "813bd3cb990a91d2964bdf1f6daca341c54cab80"
},
"com.unity.2d.animation": {
"version": "12.0.2",
"depth": 1,