Browse Source

audio added for text scroll

audio
cailean 8 months ago
parent
commit
ff5369e54f
  1. 90
      Assets/5_Scenes/DreconDemo.unity
  2. 43
      Assets/6_Splat/vfx graph/Wow.vfx
  3. 2
      Assets/8_Scripts/1_Managers/AgentManager.cs
  4. 5
      Assets/8_Scripts/1_Managers/AudioManager.cs
  5. 8
      Assets/8_Scripts/1_Managers/SubtitleManager.cs
  6. 2
      Assets/9_Models/Humanoid/SMPLX_Texture/smplx texture human actuations.mat
  7. 2
      Assets/ML-Agents/Timers/DreconDemo_timers.json
  8. 2
      Assets/Plugins/FMOD/Resources/FMODStudioSettings.asset
  9. BIN
      FMOD Banks/Desktop/Master.strings.bank
  10. BIN
      FMOD Banks/Desktop/SFX.bank

90
Assets/5_Scenes/DreconDemo.unity

@ -432,22 +432,22 @@ LineRenderer:
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
m_Positions: m_Positions:
- {x: -390.71765, y: -23.203217, z: -278.27997} - {x: -373.47278, y: -21.951202, z: -293.19318}
- {x: -125.779175, y: -23.203217, z: -278.27997} - {x: -130.61896, y: -21.951202, z: -293.19318}
- {x: -125.779175, y: -23.203217, z: -74.94177} - {x: -130.61896, y: -21.951202, z: -77.69624}
- {x: -390.71765, y: -23.203217, z: -74.94177} - {x: -373.47278, y: -21.951202, z: -77.69624}
- {x: -390.71765, y: -23.203217, z: -278.27997} - {x: -373.47278, y: -21.951202, z: -293.19318}
- {x: -390.71765, y: 424.48288, z: -278.27997} - {x: -373.47278, y: 457.06467, z: -293.19318}
- {x: -125.779175, y: 424.48288, z: -278.27997} - {x: -130.61896, y: 457.06467, z: -293.19318}
- {x: -125.779175, y: -23.203217, z: -278.27997} - {x: -130.61896, y: -21.951202, z: -293.19318}
- {x: -125.779175, y: 424.48288, z: -278.27997} - {x: -130.61896, y: 457.06467, z: -293.19318}
- {x: -125.779175, y: 424.48288, z: -74.94177} - {x: -130.61896, y: 457.06467, z: -77.69624}
- {x: -125.779175, y: -23.203217, z: -74.94177} - {x: -130.61896, y: -21.951202, z: -77.69624}
- {x: -125.779175, y: 424.48288, z: -74.94177} - {x: -130.61896, y: 457.06467, z: -77.69624}
- {x: -390.71765, y: 424.48288, z: -74.94177} - {x: -373.47278, y: 457.06467, z: -77.69624}
- {x: -390.71765, y: -23.203217, z: -74.94177} - {x: -373.47278, y: -21.951202, z: -77.69624}
- {x: -390.71765, y: 424.48288, z: -74.94177} - {x: -373.47278, y: 457.06467, z: -77.69624}
- {x: -390.71765, y: 424.48288, z: -278.27997} - {x: -373.47278, y: 457.06467, z: -293.19318}
m_Parameters: m_Parameters:
serializedVersion: 3 serializedVersion: 3
widthMultiplier: 1 widthMultiplier: 1
@ -1147,7 +1147,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 153031623} m_GameObject: {fileID: 153031623}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0.00001076108, y: 0.9982297, z: 0.059476666, w: -0.000077618104} m_LocalRotation: {x: -0.000010763137, y: 0.9982297, z: 0.059476644, w: -0.00007758362}
m_LocalPosition: {x: 18.101631, y: 8.540332, z: 4.4995093} m_LocalPosition: {x: 18.101631, y: 8.540332, z: 4.4995093}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -1247,8 +1247,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 635356105} m_Material: {fileID: 635356105}
m_Camera: {fileID: 320225265} m_Camera: {fileID: 320225265}
m_CameraFOVMin: 3 m_CameraFOVMin: 1.5
m_CameraFOVMax: 8 m_CameraFOVMax: 2.5
m_SinValue: 0.0001 m_SinValue: 0.0001
--- !u!1 &168983391 --- !u!1 &168983391
GameObject: GameObject:
@ -1759,7 +1759,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 320225263} m_GameObject: {fileID: 320225263}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.42968017, y: 0.5493336, z: -0.39451066, w: 0.5983051} m_LocalRotation: {x: 0.4296801, y: 0.54933363, z: -0.39451072, w: 0.5983051}
m_LocalPosition: {x: 69.4, y: 315, z: -332.1} m_LocalPosition: {x: 69.4, y: 315, z: -332.1}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -1788,7 +1788,7 @@ MonoBehaviour:
m_LookAt: {fileID: 489043706} m_LookAt: {fileID: 489043706}
m_Follow: {fileID: 0} m_Follow: {fileID: 0}
m_Lens: m_Lens:
FieldOfView: 7.326369 FieldOfView: 2.258173
OrthographicSize: 30.38 OrthographicSize: 30.38
NearClipPlane: 0.1 NearClipPlane: 0.1
FarClipPlane: 5000 FarClipPlane: 5000
@ -2064,7 +2064,7 @@ Camera:
height: 1 height: 1
near clip plane: 0.1 near clip plane: 0.1
far clip plane: 5000 far clip plane: 5000
field of view: 7.326369 field of view: 2.258173
orthographic: 0 orthographic: 0
orthographic size: 30.38 orthographic size: 30.38
m_Depth: -1 m_Depth: -1
@ -2090,7 +2090,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330585543} m_GameObject: {fileID: 330585543}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.42968017, y: 0.5493336, z: -0.39451066, w: 0.5983051} m_LocalRotation: {x: 0.4296801, y: 0.54933363, z: -0.39451072, w: 0.5983051}
m_LocalPosition: {x: 69.4, y: 315, z: -332.1} m_LocalPosition: {x: 69.4, y: 315, z: -332.1}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -8306,7 +8306,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1446210418} m_GameObject: {fileID: 1446210418}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0.0001879747, y: 0.99926, z: -0.004924065, w: -0.03814645} m_LocalRotation: {x: -0.00018797578, y: 0.99926, z: -0.0049240887, w: -0.038146485}
m_LocalPosition: {x: 18.109627, y: 8.274419, z: 9.536423} m_LocalPosition: {x: 18.109627, y: 8.274419, z: 9.536423}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -10163,7 +10163,7 @@ MonoBehaviour:
m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2} m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2}
m_PivotOffset: {x: 0, y: 0, z: 0} m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 1 m_AmplitudeGain: 1
m_FrequencyGain: 0.1 m_FrequencyGain: 0.5
mNoiseOffsets: {x: -11.757019, y: -299.61145, z: -901.43494} mNoiseOffsets: {x: -11.757019, y: -299.61145, z: -901.43494}
--- !u!114 &1795712170 --- !u!114 &1795712170
MonoBehaviour: MonoBehaviour:
@ -10621,22 +10621,22 @@ LineRenderer:
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
m_Positions: m_Positions:
- {x: -103.86923, y: -20.407822, z: -253.16522} - {x: -93.17091, y: -19.821457, z: -280.7508}
- {x: 203.44238, y: -20.407822, z: -253.16522} - {x: 174.03383, y: -19.821457, z: -280.7508}
- {x: 203.44238, y: -20.407822, z: 1.9637833} - {x: 174.03383, y: -19.821457, z: 5.487747}
- {x: -103.86923, y: -20.407822, z: 1.9637833} - {x: -93.17091, y: -19.821457, z: 5.487747}
- {x: -103.86923, y: -20.407822, z: -253.16522} - {x: -93.17091, y: -19.821457, z: -280.7508}
- {x: -103.86923, y: 422.0177, z: -253.16522} - {x: -93.17091, y: 465.42065, z: -280.7508}
- {x: 203.44238, y: 422.0177, z: -253.16522} - {x: 174.03383, y: 465.42065, z: -280.7508}
- {x: 203.44238, y: -20.407822, z: -253.16522} - {x: 174.03383, y: -19.821457, z: -280.7508}
- {x: 203.44238, y: 422.0177, z: -253.16522} - {x: 174.03383, y: 465.42065, z: -280.7508}
- {x: 203.44238, y: 422.0177, z: 1.9637833} - {x: 174.03383, y: 465.42065, z: 5.487747}
- {x: 203.44238, y: -20.407822, z: 1.9637833} - {x: 174.03383, y: -19.821457, z: 5.487747}
- {x: 203.44238, y: 422.0177, z: 1.9637833} - {x: 174.03383, y: 465.42065, z: 5.487747}
- {x: -103.86923, y: 422.0177, z: 1.9637833} - {x: -93.17091, y: 465.42065, z: 5.487747}
- {x: -103.86923, y: -20.407822, z: 1.9637833} - {x: -93.17091, y: -19.821457, z: 5.487747}
- {x: -103.86923, y: 422.0177, z: 1.9637833} - {x: -93.17091, y: 465.42065, z: 5.487747}
- {x: -103.86923, y: 422.0177, z: -253.16522} - {x: -93.17091, y: 465.42065, z: -280.7508}
m_Parameters: m_Parameters:
serializedVersion: 3 serializedVersion: 3
widthMultiplier: 1 widthMultiplier: 1
@ -11140,7 +11140,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1955078056} m_GameObject: {fileID: 1955078056}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.70043856, y: -0.026137054, z: 0.025706323, w: 0.71277064} m_LocalRotation: {x: 0.7004386, y: -0.026136585, z: 0.025705865, w: 0.7127706}
m_LocalPosition: {x: 18.102207, y: 11.040333, z: -0.5004903} m_LocalPosition: {x: 18.102207, y: 11.040333, z: -0.5004903}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -11227,9 +11227,9 @@ MonoBehaviour:
m_Rewards: {fileID: 459103776} m_Rewards: {fileID: 459103776}
m_CameraBlendMin: 2 m_CameraBlendMin: 2
m_CameraBlendMax: 4 m_CameraBlendMax: 4
m_CameraSwapMin: 5 m_CameraSwapMin: 30
m_CameraSwapMax: 10 m_CameraSwapMax: 45
m_CameraController: 1 m_CameraController: 0
m_HumanoidMaterial: {fileID: 2100000, guid: 597337d36e2278c4db0ba474300e988f, type: 2} m_HumanoidMaterial: {fileID: 2100000, guid: 597337d36e2278c4db0ba474300e988f, type: 2}
m_BackgroundColor: {r: 0.90196085, g: 0.2901961, b: 0.2627451, a: 0} m_BackgroundColor: {r: 0.90196085, g: 0.2901961, b: 0.2627451, a: 0}
m_PoseCanvas: {fileID: 607314882} m_PoseCanvas: {fileID: 607314882}

43
Assets/6_Splat/vfx graph/Wow.vfx

@ -19,8 +19,8 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: -1910 x: -1910
y: -283 y: -283
width: 3770 width: 3771
height: 2421 height: 2420
--- !u!114 &114350483966674976 --- !u!114 &114350483966674976
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -6390,7 +6390,9 @@ MonoBehaviour:
- context: {fileID: 8926484042661615832} - context: {fileID: 8926484042661615832}
slotIndex: 0 slotIndex: 0
m_OutputFlowSlot: m_OutputFlowSlot:
- link: [] - link:
- context: {fileID: 8926484042661615792}
slotIndex: 0
integration: 0 integration: 0
angularIntegration: 0 angularIntegration: 0
ageParticles: 1 ageParticles: 1
@ -7130,9 +7132,11 @@ MonoBehaviour:
- {fileID: 8926484042661615793} - {fileID: 8926484042661615793}
m_OutputSlots: [] m_OutputSlots: []
m_Label: m_Label:
m_Data: {fileID: 8926484042661616278} m_Data: {fileID: 8926484042661615846}
m_InputFlowSlot: m_InputFlowSlot:
- link: [] - link:
- context: {fileID: 8926484042661615769}
slotIndex: 0
m_OutputFlowSlot: m_OutputFlowSlot:
- link: [] - link: []
blendMode: 1 blendMode: 1
@ -8843,6 +8847,7 @@ MonoBehaviour:
m_Owners: m_Owners:
- {fileID: 8926484042661615832} - {fileID: 8926484042661615832}
- {fileID: 8926484042661615769} - {fileID: 8926484042661615769}
- {fileID: 8926484042661615792}
dataType: 0 dataType: 0
capacity: 10000 capacity: 10000
stripCapacity: 16 stripCapacity: 16
@ -12067,31 +12072,3 @@ MonoBehaviour:
m_Direction: 1 m_Direction: 1
m_LinkedSlots: m_LinkedSlots:
- {fileID: 8926484042661615956} - {fileID: 8926484042661615956}
--- !u!114 &8926484042661616278
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d78581a96eae8bf4398c282eb0b098bd, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 0}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
title:
m_Owners:
- {fileID: 8926484042661615792}
dataType: 0
capacity: 128
stripCapacity: 1
particlePerStripCount: 128
needsComputeBounds: 0
boundsMode: 0
m_Space: 0

2
Assets/8_Scripts/1_Managers/AgentManager.cs

@ -35,7 +35,7 @@ public class AgentManager : MonoBehaviour
private void PlayBreathing(GameObject obj, EventReference sound) private void PlayBreathing(GameObject obj, EventReference sound)
{ {
AudioManager.instance.PlayOneShotAttachedBreathing(sound, obj, 1); AudioManager.instance.PlayOneShotAttachedBreathing(sound, obj, 1f);
} }
private void PlayRespawnSFX() private void PlayRespawnSFX()

5
Assets/8_Scripts/1_Managers/AudioManager.cs

@ -40,12 +40,13 @@ public class AudioManager : MonoBehaviour
// Physic's based sounds // Physic's based sounds
public void PlayOneShotAttached(EventReference sound, GameObject obj, float force) public void PlayOneShotAttached(EventReference sound, GameObject obj, float force)
{ {
RuntimeManager.PlayOneShotAttached(sound, obj, force, 0.1f); RuntimeManager.PlayOneShotAttached(sound, obj, 1f, 0.01f);
Debug.Log(force);
} }
public void PlayOneShotAttachedBreathing(EventReference sound, GameObject obj, float force) public void PlayOneShotAttachedBreathing(EventReference sound, GameObject obj, float force)
{ {
RuntimeManager.PlayOneShotAttached(sound, obj, force, 0.3f); //RuntimeManager.PlayOneShotAttached(sound, obj, force, 0.05f);
} }
public void StopSound(EventInstance soundInst) public void StopSound(EventInstance soundInst)

8
Assets/8_Scripts/1_Managers/SubtitleManager.cs

@ -15,6 +15,10 @@ public class SubtitleManager : MonoBehaviour
private EventReference m_NarrationSFX; private EventReference m_NarrationSFX;
[SerializeField] [SerializeField]
private EventInstance m_NarrationSFXInst; private EventInstance m_NarrationSFXInst;
[SerializeField]
private EventReference m_TextScrollSFX;
[SerializeField]
private EventInstance m_TextScrollSFXInst;
private float m_TimeElapsed; private float m_TimeElapsed;
@ -97,6 +101,8 @@ public class SubtitleManager : MonoBehaviour
//m_Text.text = sentence; //m_Text.text = sentence;
m_TextScrollSFXInst = AudioManager.instance.PlaySound(m_TextScrollSFX);
m_TextScrollSFXInst.start();
foreach (char c in sentence.ToCharArray()) foreach (char c in sentence.ToCharArray())
{ {
index++; index++;
@ -111,7 +117,7 @@ public class SubtitleManager : MonoBehaviour
AudioManager.instance.StopSound(m_NarrationSFXInst); AudioManager.instance.StopSound(m_NarrationSFXInst);
} }
} }
m_TextScrollSFXInst.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
StartCoroutine(ClearText(waitTime, false)); StartCoroutine(ClearText(waitTime, false));
} }
} }

2
Assets/9_Models/Humanoid/SMPLX_Texture/smplx texture human actuations.mat

@ -143,7 +143,7 @@ Material:
- Boolean_D258FF8E: 0 - Boolean_D258FF8E: 0
- Vector1_21C41D02: 256 - Vector1_21C41D02: 256
- Vector1_6F288C5B: 0.5 - Vector1_6F288C5B: 0.5
- Vector1_B2CC132F: 55.38768 - Vector1_B2CC132F: 59.673096
- Vector1_B9994903: 11 - Vector1_B9994903: 11
- Vector1_E8746023: 16 - Vector1_E8746023: 16
- _AORemapMax: 1 - _AORemapMax: 1

2
Assets/ML-Agents/Timers/DreconDemo_timers.json

@ -1 +1 @@
{"count":1,"self":844.69345279999993,"total":869.60123679999992,"children":{"InitializeActuators":{"count":1,"self":0.0015038999999999999,"total":0.0015038999999999999,"children":null},"InitializeSensors":{"count":1,"self":0,"total":0,"children":null},"AgentSendState":{"count":51826,"self":0.30499,"total":6.9612183,"children":{"CollectObservations":{"count":25913,"self":6.569064,"total":6.5690637999999995,"children":null},"WriteActionMask":{"count":25913,"self":0.0344402,"total":0.0344402,"children":null},"RequestDecision":{"count":25913,"self":0.052724299999999995,"total":0.052724299999999995,"children":null}}},"DecideAction":{"count":51826,"self":10.3554672,"total":10.3554674,"children":null},"AgentAct":{"count":51826,"self":7.5885656,"total":7.5885653999999994,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1715173838","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_3-Moloch\\2_Unity\\Expeirments\\Drecon2022 -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-caile -hubSessionId 41e63fd2-05d9-4fd2-ba1e-c3ec0c3e6398 -accessToken ZB9P9VtSqwk78TWq9KSEmUk9W3JCHAVWi-jmNam0PaM005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1715174708"}} {"count":1,"self":76.296128,"total":78.25041929999999,"children":{"InitializeActuators":{"count":1,"self":0.0005089,"total":0.0005089,"children":null},"InitializeSensors":{"count":1,"self":0,"total":0,"children":null},"AgentSendState":{"count":4003,"self":0.012544099999999999,"total":0.48906679999999997,"children":{"CollectObservations":{"count":2002,"self":0.46498979999999995,"total":0.46498979999999995,"children":null},"WriteActionMask":{"count":2002,"self":0.0045065,"total":0.0045065,"children":null},"RequestDecision":{"count":2002,"self":0.0070263999999999995,"total":0.0070263999999999995,"children":null}}},"DecideAction":{"count":4003,"self":0.84558079999999991,"total":0.84558079999999991,"children":null},"AgentAct":{"count":4003,"self":0.6176335,"total":0.6176335,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1715191388","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_3-Moloch\\2_Unity\\Expeirments\\Drecon2022 -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-caile -hubSessionId 41e63fd2-05d9-4fd2-ba1e-c3ec0c3e6398 -accessToken ZB9P9VtSqwk78TWq9KSEmUk9W3JCHAVWi-jmNam0PaM005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1715191466"}}

2
Assets/Plugins/FMOD/Resources/FMODStudioSettings.asset

@ -457,7 +457,7 @@ MonoBehaviour:
sourceBankPath: FMOD Banks/Desktop sourceBankPath: FMOD Banks/Desktop
sourceBankPathUnformatted: sourceBankPathUnformatted:
BankRefreshCooldown: 5 BankRefreshCooldown: 5
ShowBankRefreshWindow: 0 ShowBankRefreshWindow: 1
AutomaticEventLoading: 1 AutomaticEventLoading: 1
BankLoadType: 0 BankLoadType: 0
AutomaticSampleLoading: 0 AutomaticSampleLoading: 0

BIN
FMOD Banks/Desktop/Master.strings.bank

Binary file not shown.

BIN
FMOD Banks/Desktop/SFX.bank

Binary file not shown.
Loading…
Cancel
Save