From a157675ece14e00d8bc03035a95e2bedbe157651 Mon Sep 17 00:00:00 2001 From: codeedward Date: Sun, 22 Aug 2021 18:16:57 +0100 Subject: [PATCH 01/10] Some unity auto generated files. Ignore them when merging back to the master. --- .../02a28a9c355f4fac879be8ab591f1a6a.asset | 2 +- .../17f9a240deb94feb8a71fae200bf7ff1.asset | 2 +- .../26347a43a1d94f6eba6efb6ca3d40208.asset | 2 +- .../61ff26a35193421ca949920d7f31272e.asset | 2 +- .../62e84ee9f9e643f1a032b508500bfd5c.asset | 2 +- .../699b94c63b6645b99d8ba37316fcff93.asset | 2 +- .../6a0867b1a5ad4282a9b96ce8d42b451a.asset | 2 +- .../7745ea35700249c88587f4c5b92240bb.asset | 2 +- .../7d7b607d50204db8baf1377967c5834d.asset | 2 +- .../b231a51f7f7c4d3d844fcd19f431c1aa.asset | 2 +- .../b3199c19fac9465fa8be5ad4ea3c719f.asset | 2 +- .../b34a2c376d2c45e7a78cc6eaaa9acc21.asset | 2 +- .../c9f58dccb1cb486ca75f49f57fdc3e92.asset | 2 +- .../cd18d1128bbb4721ad97d02290ff913e.asset | 2 +- .../cff9f16b897f4cb98d0b4409f93996d6.asset | 2 +- .../dc440f98f27344038ca03d19508cd548.asset | 2 +- .../efa938ae8064476a8a8f59aed80178ca.asset | 2 +- .../f63752304425437e881aa897ac1f90d4.asset | 2 +- .../ff781790d31f4ebe94553ef82955f6ad.asset | 2 +- UOP1_Project/Packages/manifest.json | 4 ++-- UOP1_Project/Packages/packages-lock.json | 16 ++++++++-------- UOP1_Project/ProjectSettings/ProjectVersion.txt | 4 ++-- .../ProjectSettings/QualitySettings.asset | 2 +- 23 files changed, 32 insertions(+), 32 deletions(-) diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/02a28a9c355f4fac879be8ab591f1a6a.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/02a28a9c355f4fac879be8ab591f1a6a.asset index d2dc18df3..7f3115744 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/02a28a9c355f4fac879be8ab591f1a6a.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/02a28a9c355f4fac879be8ab591f1a6a.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596538 + m_Name: 02a28a9c355f4fac879be8ab591f1a6a serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/17f9a240deb94feb8a71fae200bf7ff1.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/17f9a240deb94feb8a71fae200bf7ff1.asset index c0f7e5f54..d9d67ff03 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/17f9a240deb94feb8a71fae200bf7ff1.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/17f9a240deb94feb8a71fae200bf7ff1.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-598184 + m_Name: 17f9a240deb94feb8a71fae200bf7ff1 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/26347a43a1d94f6eba6efb6ca3d40208.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/26347a43a1d94f6eba6efb6ca3d40208.asset index c05062922..1b3df735e 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/26347a43a1d94f6eba6efb6ca3d40208.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/26347a43a1d94f6eba6efb6ca3d40208.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596972 + m_Name: 26347a43a1d94f6eba6efb6ca3d40208 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/61ff26a35193421ca949920d7f31272e.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/61ff26a35193421ca949920d7f31272e.asset index 03158f5fc..d8ca9b2d0 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/61ff26a35193421ca949920d7f31272e.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/61ff26a35193421ca949920d7f31272e.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596444 + m_Name: 61ff26a35193421ca949920d7f31272e serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/62e84ee9f9e643f1a032b508500bfd5c.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/62e84ee9f9e643f1a032b508500bfd5c.asset index 66548ba27..7cbddfa06 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/62e84ee9f9e643f1a032b508500bfd5c.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/62e84ee9f9e643f1a032b508500bfd5c.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596126 + m_Name: 62e84ee9f9e643f1a032b508500bfd5c serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/699b94c63b6645b99d8ba37316fcff93.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/699b94c63b6645b99d8ba37316fcff93.asset index a8aa52a04..64f63c0ec 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/699b94c63b6645b99d8ba37316fcff93.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/699b94c63b6645b99d8ba37316fcff93.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-598848 + m_Name: 699b94c63b6645b99d8ba37316fcff93 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/6a0867b1a5ad4282a9b96ce8d42b451a.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/6a0867b1a5ad4282a9b96ce8d42b451a.asset index cfb6d368c..83197d6b5 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/6a0867b1a5ad4282a9b96ce8d42b451a.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/6a0867b1a5ad4282a9b96ce8d42b451a.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596116 + m_Name: 6a0867b1a5ad4282a9b96ce8d42b451a serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/7745ea35700249c88587f4c5b92240bb.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/7745ea35700249c88587f4c5b92240bb.asset index 9d3c88152..be287944f 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/7745ea35700249c88587f4c5b92240bb.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/7745ea35700249c88587f4c5b92240bb.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596960 + m_Name: 7745ea35700249c88587f4c5b92240bb serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/7d7b607d50204db8baf1377967c5834d.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/7d7b607d50204db8baf1377967c5834d.asset index 31c92b30d..6fc51a6ce 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/7d7b607d50204db8baf1377967c5834d.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/7d7b607d50204db8baf1377967c5834d.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596984 + m_Name: 7d7b607d50204db8baf1377967c5834d serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b231a51f7f7c4d3d844fcd19f431c1aa.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b231a51f7f7c4d3d844fcd19f431c1aa.asset index d4bfc4716..af9ad1ecb 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b231a51f7f7c4d3d844fcd19f431c1aa.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b231a51f7f7c4d3d844fcd19f431c1aa.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596136 + m_Name: b231a51f7f7c4d3d844fcd19f431c1aa serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b3199c19fac9465fa8be5ad4ea3c719f.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b3199c19fac9465fa8be5ad4ea3c719f.asset index 7b863f05c..aec764fd8 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b3199c19fac9465fa8be5ad4ea3c719f.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b3199c19fac9465fa8be5ad4ea3c719f.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596106 + m_Name: b3199c19fac9465fa8be5ad4ea3c719f serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b34a2c376d2c45e7a78cc6eaaa9acc21.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b34a2c376d2c45e7a78cc6eaaa9acc21.asset index 66a992d74..acee0e3b5 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b34a2c376d2c45e7a78cc6eaaa9acc21.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/b34a2c376d2c45e7a78cc6eaaa9acc21.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-598022 + m_Name: b34a2c376d2c45e7a78cc6eaaa9acc21 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/c9f58dccb1cb486ca75f49f57fdc3e92.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/c9f58dccb1cb486ca75f49f57fdc3e92.asset index 337c00697..7dcf13ddf 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/c9f58dccb1cb486ca75f49f57fdc3e92.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/c9f58dccb1cb486ca75f49f57fdc3e92.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596324 + m_Name: c9f58dccb1cb486ca75f49f57fdc3e92 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/cd18d1128bbb4721ad97d02290ff913e.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/cd18d1128bbb4721ad97d02290ff913e.asset index 7ae609df9..0f479af85 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/cd18d1128bbb4721ad97d02290ff913e.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/cd18d1128bbb4721ad97d02290ff913e.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-598010 + m_Name: cd18d1128bbb4721ad97d02290ff913e serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/cff9f16b897f4cb98d0b4409f93996d6.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/cff9f16b897f4cb98d0b4409f93996d6.asset index 54abd3904..a9c437b93 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/cff9f16b897f4cb98d0b4409f93996d6.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/cff9f16b897f4cb98d0b4409f93996d6.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596882 + m_Name: cff9f16b897f4cb98d0b4409f93996d6 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/dc440f98f27344038ca03d19508cd548.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/dc440f98f27344038ca03d19508cd548.asset index 154d3ecbe..83367a88b 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/dc440f98f27344038ca03d19508cd548.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/dc440f98f27344038ca03d19508cd548.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-598578 + m_Name: dc440f98f27344038ca03d19508cd548 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/efa938ae8064476a8a8f59aed80178ca.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/efa938ae8064476a8a8f59aed80178ca.asset index 8ffd04a77..8da60e6d2 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/efa938ae8064476a8a8f59aed80178ca.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/efa938ae8064476a8a8f59aed80178ca.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-598172 + m_Name: efa938ae8064476a8a8f59aed80178ca serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/f63752304425437e881aa897ac1f90d4.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/f63752304425437e881aa897ac1f90d4.asset index 30a7f2445..7335c5308 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/f63752304425437e881aa897ac1f90d4.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/f63752304425437e881aa897ac1f90d4.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-598530 + m_Name: f63752304425437e881aa897ac1f90d4 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/ff781790d31f4ebe94553ef82955f6ad.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/ff781790d31f4ebe94553ef82955f6ad.asset index e5eee4d00..9867517b4 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/ff781790d31f4ebe94553ef82955f6ad.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/ff781790d31f4ebe94553ef82955f6ad.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-596094 + m_Name: ff781790d31f4ebe94553ef82955f6ad serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Packages/manifest.json b/UOP1_Project/Packages/manifest.json index f46180d16..1f1ff4512 100644 --- a/UOP1_Project/Packages/manifest.json +++ b/UOP1_Project/Packages/manifest.json @@ -6,7 +6,7 @@ "com.unity.burst": "1.4.8", "com.unity.cinemachine": "2.7.4", "com.unity.ide.rider": "2.0.7", - "com.unity.ide.visualstudio": "2.0.8", + "com.unity.ide.visualstudio": "2.0.11", "com.unity.ide.vscode": "1.2.3", "com.unity.inputsystem": "1.0.2", "com.unity.learn.iet-framework": "2.0.0-pre.4", @@ -14,7 +14,7 @@ "com.unity.polybrush": "1.0.2", "com.unity.probuilder": "4.5.0", "com.unity.recorder": "2.5.5", - "com.unity.render-pipelines.universal": "10.5.0", + "com.unity.render-pipelines.universal": "10.5.1", "com.unity.scriptablebuildpipeline": "1.16.1", "com.unity.settings-manager": "1.0.3", "com.unity.textmeshpro": "3.0.6", diff --git a/UOP1_Project/Packages/packages-lock.json b/UOP1_Project/Packages/packages-lock.json index 538436e7e..ff089b2ec 100644 --- a/UOP1_Project/Packages/packages-lock.json +++ b/UOP1_Project/Packages/packages-lock.json @@ -70,7 +70,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.visualstudio": { - "version": "2.0.8", + "version": "2.0.11", "depth": 0, "source": "registry", "dependencies": { @@ -146,7 +146,7 @@ "url": "https://packages.unity.com" }, "com.unity.render-pipelines.core": { - "version": "10.5.0", + "version": "10.5.1", "depth": 1, "source": "registry", "dependencies": { @@ -155,13 +155,13 @@ "url": "https://packages.unity.com" }, "com.unity.render-pipelines.universal": { - "version": "10.5.0", + "version": "10.5.1", "depth": 0, "source": "registry", "dependencies": { "com.unity.mathematics": "1.1.0", - "com.unity.render-pipelines.core": "10.5.0", - "com.unity.shadergraph": "10.5.0" + "com.unity.render-pipelines.core": "10.5.1", + "com.unity.shadergraph": "10.5.1" }, "url": "https://packages.unity.com" }, @@ -187,17 +187,17 @@ "url": "https://packages.unity.com" }, "com.unity.shadergraph": { - "version": "10.5.0", + "version": "10.5.1", "depth": 1, "source": "registry", "dependencies": { - "com.unity.render-pipelines.core": "10.5.0", + "com.unity.render-pipelines.core": "10.5.1", "com.unity.searcher": "4.3.2" }, "url": "https://packages.unity.com" }, "com.unity.test-framework": { - "version": "1.1.24", + "version": "1.1.27", "depth": 1, "source": "registry", "dependencies": { diff --git a/UOP1_Project/ProjectSettings/ProjectVersion.txt b/UOP1_Project/ProjectSettings/ProjectVersion.txt index 79c71bce8..35d8282d7 100644 --- a/UOP1_Project/ProjectSettings/ProjectVersion.txt +++ b/UOP1_Project/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2020.3.12f1 -m_EditorVersionWithRevision: 2020.3.12f1 (b3b2c6512326) +m_EditorVersion: 2020.3.16f1 +m_EditorVersionWithRevision: 2020.3.16f1 (049d6eca3c44) diff --git a/UOP1_Project/ProjectSettings/QualitySettings.asset b/UOP1_Project/ProjectSettings/QualitySettings.asset index 355fbe424..c6e4fa9ca 100644 --- a/UOP1_Project/ProjectSettings/QualitySettings.asset +++ b/UOP1_Project/ProjectSettings/QualitySettings.asset @@ -21,7 +21,7 @@ QualitySettings: skinWeights: 4 textureQuality: 0 anisotropicTextures: 1 - antiAliasing: 0 + antiAliasing: 2 softParticles: 0 softVegetation: 1 realtimeReflectionProbes: 1 From ffae0442f0a07daa6d539cc7c8f77afdb66a52e9 Mon Sep 17 00:00:00 2001 From: codeedward Date: Wed, 1 Sep 2021 14:16:32 +0200 Subject: [PATCH 02/10] Prototype for captioning - 1st part (without off-screen indication). Needs refactoring. --- .../Localization-Assets-Shared.asset | 5 + ...alization-String-Tables-English (en).asset | 5 + ...calization-String-Tables-French (fr).asset | 5 + ...alization-String-Tables-Italian (it).asset | 5 + .../AssetTables/Onomatopoeia.meta | 8 + .../Onomatopoeia Shared Data.asset | 48 ++++ .../Onomatopoeia Shared Data.asset.meta | 8 + .../Onomatopoeia/Onomatopoeia.asset | 23 ++ .../Onomatopoeia/Onomatopoeia.asset.meta | 8 + .../Onomatopoeia/Onomatopoeia_en.asset | 42 ++++ .../Onomatopoeia/Onomatopoeia_en.asset.meta | 8 + .../Onomatopoeia/Onomatopoeia_fr.asset | 42 ++++ .../Onomatopoeia/Onomatopoeia_fr.asset.meta | 8 + .../Onomatopoeia/Onomatopoeia_it.asset | 42 ++++ .../Onomatopoeia/Onomatopoeia_it.asset.meta | 8 + .../Assets/Prefabs/Audio/Onomatopoeia.prefab | 216 ++++++++++++++++++ .../Prefabs/Audio/Onomatopoeia.prefab.meta | 7 + .../Scenes/Managers/PersistentManagers.unity | 16 ++ .../NPCs/Bard Hare/SFX_BardHareSingLong.asset | 11 + .../Bard Hare/SFX_BardHareSingShort.asset | 11 + .../AudioCues/SFX/Protagonist/SFX_Jump.asset | 11 + .../AudioCues/SFX/Protagonist/SFX_Land.asset | 11 + .../SFX/Protagonist/SFX_SwingCane.asset | 11 + .../Audio/AudioCues/SFX/SFX_CookingPot.asset | 4 + .../AudioCues/SFX/SFX_Footsteps_Grass.asset | 2 + .../AudioCues/SFX/SFX_Footsteps_Sand_A.asset | 11 + .../AudioCues/SFX/SFX_Footsteps_Sand_B.asset | 11 + .../AudioCues/SFX/SFX_Footsteps_Soil_A.asset | 11 + .../AudioCues/SFX/SFX_Footsteps_Soil_B.asset | 11 + .../Scripts/Audio/AudioData/AudioCueSO.cs | 23 +- .../Assets/Scripts/Audio/AudioManager.cs | 18 +- .../Scripts/Audio/ClosedCaptioningSystem.cs | 29 +++ .../Audio/ClosedCaptioningSystem.cs.meta | 11 + .../Scripts/Audio/VisualisableAudioClip.cs | 16 ++ .../Audio/VisualisableAudioClip.cs.meta | 11 + .../Assets/Scripts/Camera/BillboardEffect.cs | 19 ++ .../Scripts/Camera/BillboardEffect.cs.meta | 11 + 37 files changed, 737 insertions(+), 10 deletions(-) create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia.meta create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset.meta create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia.asset create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia.asset.meta create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_en.asset create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_en.asset.meta create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_fr.asset create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_fr.asset.meta create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_it.asset create mode 100644 UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_it.asset.meta create mode 100644 UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab create mode 100644 UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab.meta create mode 100644 UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs create mode 100644 UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs.meta create mode 100644 UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs create mode 100644 UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs.meta create mode 100644 UOP1_Project/Assets/Scripts/Camera/BillboardEffect.cs create mode 100644 UOP1_Project/Assets/Scripts/Camera/BillboardEffect.cs.meta diff --git a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset index 1a98a09ef..73dcfe0d7 100644 --- a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset +++ b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset @@ -62,6 +62,11 @@ MonoBehaviour: m_Address: Assets/UI/UI Misc Shared Data.asset m_ReadOnly: 1 m_SerializedLabels: [] + - m_GUID: d299736136010ec4f926836ea5b14a66 + m_Address: Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared + Data.asset + m_ReadOnly: 1 + m_SerializedLabels: [] m_ReadOnly: 1 m_Settings: {fileID: 11400000, guid: bffab80dc16c4464b92b2e97b6a1964c, type: 2} m_SchemaSet: diff --git a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset index 50f118b62..f5da64e3b 100644 --- a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset +++ b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset @@ -64,6 +64,11 @@ MonoBehaviour: m_SerializedLabels: - Locale-en - Preload + - m_GUID: c09a5a81dffeac540a7dced4c3bbef3d + m_Address: Onomatopoeia_en + m_ReadOnly: 1 + m_SerializedLabels: + - Locale-en m_ReadOnly: 1 m_Settings: {fileID: 11400000, guid: bffab80dc16c4464b92b2e97b6a1964c, type: 2} m_SchemaSet: diff --git a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-French (fr).asset b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-French (fr).asset index ebf787e14..ff6c6722d 100644 --- a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-French (fr).asset +++ b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-French (fr).asset @@ -64,6 +64,11 @@ MonoBehaviour: m_SerializedLabels: - Locale-fr - Preload + - m_GUID: 637939d10d6fe314d8ffe3d0a63c7dd5 + m_Address: Onomatopoeia_fr + m_ReadOnly: 1 + m_SerializedLabels: + - Locale-fr m_ReadOnly: 1 m_Settings: {fileID: 11400000, guid: bffab80dc16c4464b92b2e97b6a1964c, type: 2} m_SchemaSet: diff --git a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Italian (it).asset b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Italian (it).asset index 629d4b034..39b5e7999 100644 --- a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Italian (it).asset +++ b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Italian (it).asset @@ -48,6 +48,11 @@ MonoBehaviour: m_ReadOnly: 1 m_SerializedLabels: - Locale-it + - m_GUID: 3ef13080fdb719940a37520e887c63e4 + m_Address: Onomatopoeia_it + m_ReadOnly: 1 + m_SerializedLabels: + - Locale-it m_ReadOnly: 1 m_Settings: {fileID: 11400000, guid: bffab80dc16c4464b92b2e97b6a1964c, type: 2} m_SchemaSet: diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia.meta b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia.meta new file mode 100644 index 000000000..70b6aeb3c --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 49079d62a7a79ac4cb6d94d6255b3aa5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset new file mode 100644 index 000000000..c7433741b --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset @@ -0,0 +1,48 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +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: 5b11a58205ec3474ca216360e9fa74a8, type: 3} + m_Name: Onomatopoeia Shared Data + m_EditorClassIdentifier: + m_TableCollectionName: Onomatopoeia + m_TableCollectionNameGuidString: d299736136010ec4f926836ea5b14a66 + m_Entries: + - m_Id: 105602867200 + m_Key: Footstep + m_Metadata: + m_Items: [] + - m_Id: 184631943168 + m_Key: Land + m_Metadata: + m_Items: [] + - m_Id: 597615697920 + m_Key: Attack + m_Metadata: + m_Items: [] + - m_Id: 30931925327872 + m_Key: BardHareSingLong + m_Metadata: + m_Items: [] + - m_Id: 31158178668544 + m_Key: BardHareSingShort + m_Metadata: + m_Items: [] + m_Metadata: + m_Items: [] + m_KeyGenerator: + id: 0 + references: + version: 1 + 00000000: + type: {class: DistributedUIDGenerator, ns: UnityEngine.Localization.Tables, + asm: Unity.Localization} + data: + m_CustomEpoch: 1630233026596 diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset.meta b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset.meta new file mode 100644 index 000000000..c09290e24 --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d299736136010ec4f926836ea5b14a66 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia.asset b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia.asset new file mode 100644 index 000000000..cd07e2885 --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia.asset @@ -0,0 +1,23 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +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: 5be51871efa6c3e4eae1703925c8f5ac, type: 3} + m_Name: Onomatopoeia + m_EditorClassIdentifier: + m_SharedTableData: {fileID: 11400000, guid: d299736136010ec4f926836ea5b14a66, type: 2} + m_Tables: + - {fileID: 11400000, guid: c09a5a81dffeac540a7dced4c3bbef3d, type: 2} + - {fileID: 11400000, guid: 637939d10d6fe314d8ffe3d0a63c7dd5, type: 2} + - {fileID: 11400000, guid: 3ef13080fdb719940a37520e887c63e4, type: 2} + m_Extensions: [] + m_Group: String Table + references: + version: 1 diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia.asset.meta b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia.asset.meta new file mode 100644 index 000000000..6d6ea4e03 --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8fbb579047bcfa344a65a56776c5e551 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_en.asset b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_en.asset new file mode 100644 index 000000000..b721031bd --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_en.asset @@ -0,0 +1,42 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +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: e9620f8c34305754d8cc9a7e49e852d9, type: 3} + m_Name: Onomatopoeia_en + m_EditorClassIdentifier: + m_LocaleId: + m_Code: en + m_SharedData: {fileID: 11400000, guid: d299736136010ec4f926836ea5b14a66, type: 2} + m_Metadata: + m_Items: [] + m_TableData: + - m_Id: 105602867200 + m_Localized: clack en + m_Metadata: + m_Items: [] + - m_Id: 184631943168 + m_Localized: bong en + m_Metadata: + m_Items: [] + - m_Id: 597615697920 + m_Localized: whisk en + m_Metadata: + m_Items: [] + - m_Id: 30931925327872 + m_Localized: Lalala en + m_Metadata: + m_Items: [] + - m_Id: 31158178668544 + m_Localized: La en + m_Metadata: + m_Items: [] + references: + version: 1 diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_en.asset.meta b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_en.asset.meta new file mode 100644 index 000000000..ef085c286 --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_en.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c09a5a81dffeac540a7dced4c3bbef3d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_fr.asset b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_fr.asset new file mode 100644 index 000000000..b4a8df7fe --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_fr.asset @@ -0,0 +1,42 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +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: e9620f8c34305754d8cc9a7e49e852d9, type: 3} + m_Name: Onomatopoeia_fr + m_EditorClassIdentifier: + m_LocaleId: + m_Code: fr + m_SharedData: {fileID: 11400000, guid: d299736136010ec4f926836ea5b14a66, type: 2} + m_Metadata: + m_Items: [] + m_TableData: + - m_Id: 184631943168 + m_Localized: bong fr + m_Metadata: + m_Items: [] + - m_Id: 105602867200 + m_Localized: clack fr + m_Metadata: + m_Items: [] + - m_Id: 597615697920 + m_Localized: whisk fr + m_Metadata: + m_Items: [] + - m_Id: 30931925327872 + m_Localized: Lalala fr + m_Metadata: + m_Items: [] + - m_Id: 31158178668544 + m_Localized: La fr + m_Metadata: + m_Items: [] + references: + version: 1 diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_fr.asset.meta b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_fr.asset.meta new file mode 100644 index 000000000..8f6f14bc8 --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_fr.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 637939d10d6fe314d8ffe3d0a63c7dd5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_it.asset b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_it.asset new file mode 100644 index 000000000..cf33280da --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_it.asset @@ -0,0 +1,42 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +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: e9620f8c34305754d8cc9a7e49e852d9, type: 3} + m_Name: Onomatopoeia_it + m_EditorClassIdentifier: + m_LocaleId: + m_Code: it + m_SharedData: {fileID: 11400000, guid: d299736136010ec4f926836ea5b14a66, type: 2} + m_Metadata: + m_Items: [] + m_TableData: + - m_Id: 184631943168 + m_Localized: bong it + m_Metadata: + m_Items: [] + - m_Id: 105602867200 + m_Localized: clack it + m_Metadata: + m_Items: [] + - m_Id: 597615697920 + m_Localized: whisk it + m_Metadata: + m_Items: [] + - m_Id: 30931925327872 + m_Localized: Lalala it + m_Metadata: + m_Items: [] + - m_Id: 31158178668544 + m_Localized: La it + m_Metadata: + m_Items: [] + references: + version: 1 diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_it.asset.meta b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_it.asset.meta new file mode 100644 index 000000000..52500e744 --- /dev/null +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia_it.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3ef13080fdb719940a37520e887c63e4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab b/UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab new file mode 100644 index 000000000..bfd25b1f9 --- /dev/null +++ b/UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab @@ -0,0 +1,216 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1523642331203292786 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 21582440602513086} + - component: {fileID: 3810624873124145809} + - component: {fileID: 798357675693441937} + - component: {fileID: 3279109364426998505} + m_Layer: 0 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &21582440602513086 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1523642331203292786} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 6235676119615081003} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 2.5} + m_SizeDelta: {x: 20, y: 5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!23 &3810624873124145809 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1523642331203292786} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &798357675693441937 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1523642331203292786} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Sample text + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 4 + m_fontSizeBase: 4 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 3810624873124145809} + m_maskType: 0 + _SortingLayer: 0 + _SortingLayerID: 0 + _SortingOrder: 0 +--- !u!114 &3279109364426998505 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1523642331203292786} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 213402e454e6ca0418187e1fd37c87d5, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1657682584543887628 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6235676119615081003} + m_Layer: 0 + m_Name: Onomatopoeia + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6235676119615081003 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1657682584543887628} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 21582440602513086} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab.meta b/UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab.meta new file mode 100644 index 000000000..c998f2612 --- /dev/null +++ b/UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 544279658fa0bb945a4c07d654ea6f4c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity b/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity index 3d7d6b921..86995cfaf 100644 --- a/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity +++ b/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity @@ -179,6 +179,7 @@ GameObject: - component: {fileID: 610459581} - component: {fileID: 610459582} - component: {fileID: 610459583} + - component: {fileID: 610459584} m_Layer: 0 m_Name: AudioManager m_TagString: AudioManager @@ -257,6 +258,21 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 +--- !u!114 &610459584 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 610459580} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 65d684353f07ccf409beaa53fa24df9e, type: 3} + m_Name: + m_EditorClassIdentifier: + OnomatopoeiaPrefab: {fileID: 1657682584543887628, guid: 544279658fa0bb945a4c07d654ea6f4c, + type: 3} + _SFXEventChannel: {fileID: 11400000, guid: c3c796b7c31ad3647a3fbae42e74764e, type: 2} --- !u!1 &740063860 GameObject: m_ObjectHideFlags: 0 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingLong.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingLong.asset index 394c347e9..161abe505 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingLong.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingLong.asset @@ -19,3 +19,14 @@ MonoBehaviour: - {fileID: 8300000, guid: facbfb134e075e94a8e1c2c65848224d, type: 3} - {fileID: 8300000, guid: a00b5be1b60d89a4898b123f275a9ace, type: 3} - {fileID: 8300000, guid: 2878f6d9831a0ed41bcc57f175c20785, type: 3} + Onomatopoeia: + Visualise: 1 + SoundText: + m_TableReference: + m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableEntryReference: + m_KeyId: 30931925327872 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingShort.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingShort.asset index f3d9dfb15..31b37c9be 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingShort.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingShort.asset @@ -25,3 +25,14 @@ MonoBehaviour: - {fileID: 8300000, guid: 4fe92c8d34b05ea468feb98a3c7c3e7d, type: 3} - {fileID: 8300000, guid: e01575ef724421848bd0a1ce836ab938, type: 3} - {fileID: 8300000, guid: 191f45089816a0e4ca159973f3ac2597, type: 3} + Onomatopoeia: + Visualise: 1 + SoundText: + m_TableReference: + m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableEntryReference: + m_KeyId: 31158178668544 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Jump.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Jump.asset index d160b39b6..c0c96cd67 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Jump.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Jump.asset @@ -18,3 +18,14 @@ MonoBehaviour: audioClips: - {fileID: 8300000, guid: a068a030a7c9261409c84c54bdc0cb1e, type: 3} - {fileID: 8300000, guid: 4cca136af1e6a7741a94f95697a6746a, type: 3} + Onomatopoeia: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset index 67425b630..b3373d771 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset @@ -17,3 +17,14 @@ MonoBehaviour: - sequenceMode: 2 audioClips: - {fileID: 8300000, guid: e0e1785c8995b62439473ff886ea115d, type: 3} + Onomatopoeia: + Visualise: 1 + SoundText: + m_TableReference: + m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableEntryReference: + m_KeyId: 184631943168 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset index 748b8efac..25bad1383 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset @@ -19,3 +19,14 @@ MonoBehaviour: - {fileID: 8300000, guid: d083bbbea46310b49b4f2bc825da3356, type: 3} - {fileID: 8300000, guid: c9e9f3c13ca8a2449b95437d67506110, type: 3} - {fileID: 8300000, guid: 9b8b36841533b9f46875b542d77513b8, type: 3} + Onomatopoeia: + Visualise: 1 + SoundText: + m_TableReference: + m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableEntryReference: + m_KeyId: 597615697920 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_CookingPot.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_CookingPot.asset index fe522ae77..4ca5f4168 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_CookingPot.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_CookingPot.asset @@ -17,6 +17,10 @@ MonoBehaviour: - sequenceMode: 2 audioClips: - {fileID: 8300000, guid: f49cdea4e85b04641945385e5107c1c1, type: 3} + Onomatopoeia: + Visualise: 1 - sequenceMode: 2 audioClips: - {fileID: 8300000, guid: 5c99c2bc939d4aa4da68a9f750985e31, type: 3} + Onomatopoeia: + Visualise: 0 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Grass.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Grass.asset index 4b3fd85fd..95b96c691 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Grass.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Grass.asset @@ -29,3 +29,5 @@ MonoBehaviour: - {fileID: 8300000, guid: cefc29d2c12eeae46891b0ad4c1b4369, type: 3} - {fileID: 8300000, guid: bec5e9373333fd646a6a5d233dff824e, type: 3} - {fileID: 8300000, guid: 0d879f2aa67ca1043b30ee86c6786571, type: 3} + Onomatopoeia: + Visualise: 0 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_A.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_A.asset index 856c17d8a..bdbb261a1 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_A.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_A.asset @@ -29,3 +29,14 @@ MonoBehaviour: - {fileID: 8300000, guid: f46bf6da4c69f354ea98ad5754eabd97, type: 3} - {fileID: 8300000, guid: 6ffffcb76591869429c028d9ca627e5e, type: 3} - {fileID: 8300000, guid: 1180216b6dd787b4fbb232fbf0d388b9, type: 3} + Onomatopoeia: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableEntryReference: + m_KeyId: 105602867200 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 0.5 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_B.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_B.asset index e25ad27f2..bccc2f2db 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_B.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_B.asset @@ -36,3 +36,14 @@ MonoBehaviour: - {fileID: 8300000, guid: a1bd2fdc9873e7f4e9bd3b0fe730f0fa, type: 3} - {fileID: 8300000, guid: 89a063162ec0f064a81397c3192140b8, type: 3} - {fileID: 8300000, guid: 65b8763d9bd257244800ae763bd95fb4, type: 3} + Onomatopoeia: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableEntryReference: + m_KeyId: 105602867200 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 0.5 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_A.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_A.asset index 07d2a21a6..e50105f6c 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_A.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_A.asset @@ -43,3 +43,14 @@ MonoBehaviour: - {fileID: 8300000, guid: 4bf5da42a1fc24a4580a6ff3e4fa70f0, type: 3} - {fileID: 8300000, guid: a1f7619f9aded4a4d93bd329e09e45a2, type: 3} - {fileID: 8300000, guid: 3c663be68d928a44eb3b16ce81b2e4a5, type: 3} + Onomatopoeia: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableEntryReference: + m_KeyId: 105602867200 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 0.5 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_B.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_B.asset index 2dbdac656..0f04dfb4a 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_B.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_B.asset @@ -29,3 +29,14 @@ MonoBehaviour: - {fileID: 8300000, guid: e51d9830248780448a0433673c4372b9, type: 3} - {fileID: 8300000, guid: a53434d92f6708b48be8321cec13975c, type: 3} - {fileID: 8300000, guid: c63a93a4c56b8464ea093e8b9411dc94, type: 3} + Onomatopoeia: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableEntryReference: + m_KeyId: 105602867200 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 0.5 diff --git a/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs b/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs index 6284e42f4..2b2a4d813 100644 --- a/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs +++ b/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs @@ -1,5 +1,7 @@ -using System; +using Assets.Scripts.Audio; +using System; using UnityEngine; +using UnityEngine.Localization; /// /// A collection of audio clips that are played in parallel, and support randomisation. @@ -10,10 +12,10 @@ public class AudioCueSO : ScriptableObject public bool looping = false; [SerializeField] private AudioClipsGroup[] _audioClipGroups = default; - public AudioClip[] GetClips() + public VisualisableAudioClip[] GetClips() { int numberOfClips = _audioClipGroups.Length; - AudioClip[] resultingClips = new AudioClip[numberOfClips]; + VisualisableAudioClip[] resultingClips = new VisualisableAudioClip[numberOfClips]; for (int i = 0; i < numberOfClips; i++) { @@ -33,6 +35,7 @@ public class AudioClipsGroup { public SequenceMode sequenceMode = SequenceMode.RandomNoImmediateRepeat; public AudioClip[] audioClips; + public Onomatopoeia Onomatopoeia = default; private int _nextClipToPlay = -1; private int _lastClipPlayed = -1; @@ -41,11 +44,11 @@ public class AudioClipsGroup /// Chooses the next clip in the sequence, either following the order or randomly. /// /// A reference to an AudioClip - public AudioClip GetNextClip() + public VisualisableAudioClip GetNextClip() { // Fast out if there is only one clip to play if (audioClips.Length == 1) - return audioClips[0]; + return new VisualisableAudioClip(audioClips[0], Onomatopoeia); if (_nextClipToPlay == -1) { @@ -76,7 +79,7 @@ public AudioClip GetNextClip() _lastClipPlayed = _nextClipToPlay; - return audioClips[_nextClipToPlay]; + return new VisualisableAudioClip(audioClips[_nextClipToPlay], Onomatopoeia); } public enum SequenceMode @@ -86,3 +89,11 @@ public enum SequenceMode Sequential, } } + +[Serializable] +public class Onomatopoeia +{ + public bool Visualise = true; + public LocalizedString SoundText; + public float Duration = 1f; +} diff --git a/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs b/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs index 539eec856..bf144e861 100644 --- a/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs +++ b/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs @@ -4,6 +4,7 @@ using UnityEngine; using UnityEngine.Audio; using System; +using Assets.Scripts.Audio; public class AudioManager : MonoBehaviour { @@ -143,7 +144,7 @@ private AudioCueKey PlayMusicTrack(AudioCueSO audioCue, AudioConfigurationSO aud if (_musicSoundEmitter != null && _musicSoundEmitter.IsPlaying()) { - AudioClip songToPlay = audioCue.GetClips()[0]; + AudioClip songToPlay = audioCue.GetClips()[0].Clip; if (_musicSoundEmitter.GetClip() == songToPlay) return AudioCueKey.Invalid; @@ -152,7 +153,7 @@ private AudioCueKey PlayMusicTrack(AudioCueSO audioCue, AudioConfigurationSO aud } _musicSoundEmitter = _pool.Request(); - _musicSoundEmitter.FadeMusicIn(audioCue.GetClips()[0], audioConfiguration, 1f, startTime); + _musicSoundEmitter.FadeMusicIn(audioCue.GetClips()[0].Clip, audioConfiguration, 1f, startTime); _musicSoundEmitter.OnSoundFinishedPlaying += StopMusicEmitter; return AudioCueKey.Invalid; //No need to return a valid key for music @@ -183,7 +184,7 @@ public void TimelineInterruptsMusic() /// public AudioCueKey PlayAudioCue(AudioCueSO audioCue, AudioConfigurationSO settings, Vector3 position = default) { - AudioClip[] clipsToPlay = audioCue.GetClips(); + VisualisableAudioClip[] clipsToPlay = audioCue.GetClips(); SoundEmitter[] soundEmitterArray = new SoundEmitter[clipsToPlay.Length]; int nOfClips = clipsToPlay.Length; @@ -192,9 +193,18 @@ public AudioCueKey PlayAudioCue(AudioCueSO audioCue, AudioConfigurationSO settin soundEmitterArray[i] = _pool.Request(); if (soundEmitterArray[i] != null) { - soundEmitterArray[i].PlayAudioClip(clipsToPlay[i], settings, audioCue.looping, position); + soundEmitterArray[i].PlayAudioClip(clipsToPlay[i].Clip, settings, audioCue.looping, position); + if (!audioCue.looping) + { soundEmitterArray[i].OnSoundFinishedPlaying += OnSoundEmitterFinishedPlaying; + } + + if (clipsToPlay[i].Onomatopoeia.Visualise && !audioCue.looping) + { + var captioningSystem = this.GetComponent(); + captioningSystem.VisualiseAudioClip(clipsToPlay[i].Onomatopoeia, position); + } } } diff --git a/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs b/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs new file mode 100644 index 000000000..1d8a7b12a --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs @@ -0,0 +1,29 @@ +using System.Collections; +using TMPro; +using UnityEngine; + +namespace Assets.Scripts.Audio +{ + public class ClosedCaptioningSystem : MonoBehaviour + { + public GameObject OnomatopoeiaPrefab; + + public void VisualiseAudioClip(Onomatopoeia onomatopoeia, Vector3 position = default) + { + var newOnomatopoeia = Instantiate(OnomatopoeiaPrefab, position, Quaternion.identity); + var onomatopoeiaTextComponent = newOnomatopoeia.GetComponentInChildren(); + + if (!string.IsNullOrEmpty(onomatopoeia.SoundText.TableReference)) + { + onomatopoeiaTextComponent.text = onomatopoeia.SoundText.GetLocalizedString(); + } + StartCoroutine(DestroyNewOnomatopoeia(newOnomatopoeia, onomatopoeia.Duration)); + } + + IEnumerator DestroyNewOnomatopoeia(GameObject newOnomatopoeia, float duration) + { + yield return new WaitForSeconds(duration); + Destroy(newOnomatopoeia); + } + } +} diff --git a/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs.meta b/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs.meta new file mode 100644 index 000000000..2f878dcc4 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 65d684353f07ccf409beaa53fa24df9e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs b/UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs new file mode 100644 index 000000000..01eead2e0 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs @@ -0,0 +1,16 @@ +using UnityEngine; + +namespace Assets.Scripts.Audio +{ + public class VisualisableAudioClip + { + public AudioClip Clip; + public Onomatopoeia Onomatopoeia; + + public VisualisableAudioClip(AudioClip clip, Onomatopoeia onomatopoeia) + { + Clip = clip; + Onomatopoeia = onomatopoeia; + } + } +} diff --git a/UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs.meta b/UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs.meta new file mode 100644 index 000000000..6d35fbc38 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 221a0bcbbd9b75942a057cc48e4c5067 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scripts/Camera/BillboardEffect.cs b/UOP1_Project/Assets/Scripts/Camera/BillboardEffect.cs new file mode 100644 index 000000000..e3805f760 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Camera/BillboardEffect.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace Assets.Scripts.Camera +{ + public class BillboardEffect : MonoBehaviour + { + private Transform cam; + + private void Start() + { + cam = GameObject.Find("Main Camera").transform; + } + + void LateUpdate() + { + transform.LookAt(transform.position + cam.forward); + } + } +} diff --git a/UOP1_Project/Assets/Scripts/Camera/BillboardEffect.cs.meta b/UOP1_Project/Assets/Scripts/Camera/BillboardEffect.cs.meta new file mode 100644 index 000000000..35a96815e --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Camera/BillboardEffect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 213402e454e6ca0418187e1fd37c87d5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 006a12f7a956cbe8b1d02016906c293c26e66913 Mon Sep 17 00:00:00 2001 From: codeedward Date: Wed, 1 Sep 2021 15:20:17 +0200 Subject: [PATCH 03/10] Rename Onomatopoeia to Caption. --- .../Assets/Scripts/Audio/AudioData/AudioCueSO.cs | 8 ++++---- .../Assets/Scripts/Audio/AudioManager.cs | 4 ++-- .../Scripts/Audio/ClosedCaptioningSystem.cs | 16 ++++++++-------- .../Scripts/Audio/VisualisableAudioClip.cs | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs b/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs index 2b2a4d813..76f146100 100644 --- a/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs +++ b/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs @@ -35,7 +35,7 @@ public class AudioClipsGroup { public SequenceMode sequenceMode = SequenceMode.RandomNoImmediateRepeat; public AudioClip[] audioClips; - public Onomatopoeia Onomatopoeia = default; + public Caption Caption = default; private int _nextClipToPlay = -1; private int _lastClipPlayed = -1; @@ -48,7 +48,7 @@ public VisualisableAudioClip GetNextClip() { // Fast out if there is only one clip to play if (audioClips.Length == 1) - return new VisualisableAudioClip(audioClips[0], Onomatopoeia); + return new VisualisableAudioClip(audioClips[0], Caption); if (_nextClipToPlay == -1) { @@ -79,7 +79,7 @@ public VisualisableAudioClip GetNextClip() _lastClipPlayed = _nextClipToPlay; - return new VisualisableAudioClip(audioClips[_nextClipToPlay], Onomatopoeia); + return new VisualisableAudioClip(audioClips[_nextClipToPlay], Caption); } public enum SequenceMode @@ -91,7 +91,7 @@ public enum SequenceMode } [Serializable] -public class Onomatopoeia +public class Caption { public bool Visualise = true; public LocalizedString SoundText; diff --git a/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs b/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs index bf144e861..6d5c79a3c 100644 --- a/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs +++ b/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs @@ -200,10 +200,10 @@ public AudioCueKey PlayAudioCue(AudioCueSO audioCue, AudioConfigurationSO settin soundEmitterArray[i].OnSoundFinishedPlaying += OnSoundEmitterFinishedPlaying; } - if (clipsToPlay[i].Onomatopoeia.Visualise && !audioCue.looping) + if (clipsToPlay[i].Caption.Visualise && !audioCue.looping) { var captioningSystem = this.GetComponent(); - captioningSystem.VisualiseAudioClip(clipsToPlay[i].Onomatopoeia, position); + captioningSystem.VisualiseAudioClip(clipsToPlay[i].Caption, position); } } } diff --git a/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs b/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs index 1d8a7b12a..2e6bfbd2c 100644 --- a/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs +++ b/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs @@ -6,21 +6,21 @@ namespace Assets.Scripts.Audio { public class ClosedCaptioningSystem : MonoBehaviour { - public GameObject OnomatopoeiaPrefab; + public GameObject CaptionPrefab; - public void VisualiseAudioClip(Onomatopoeia onomatopoeia, Vector3 position = default) + public void VisualiseAudioClip(Caption caption, Vector3 position = default) { - var newOnomatopoeia = Instantiate(OnomatopoeiaPrefab, position, Quaternion.identity); - var onomatopoeiaTextComponent = newOnomatopoeia.GetComponentInChildren(); + var newCaption = Instantiate(CaptionPrefab, position, Quaternion.identity); + var captionTextComponent = newCaption.GetComponentInChildren(); - if (!string.IsNullOrEmpty(onomatopoeia.SoundText.TableReference)) + if (!string.IsNullOrEmpty(caption.SoundText.TableReference)) { - onomatopoeiaTextComponent.text = onomatopoeia.SoundText.GetLocalizedString(); + captionTextComponent.text = caption.SoundText.GetLocalizedString(); } - StartCoroutine(DestroyNewOnomatopoeia(newOnomatopoeia, onomatopoeia.Duration)); + StartCoroutine(DestroyNewCaption(newCaption, caption.Duration)); } - IEnumerator DestroyNewOnomatopoeia(GameObject newOnomatopoeia, float duration) + IEnumerator DestroyNewCaption(GameObject newOnomatopoeia, float duration) { yield return new WaitForSeconds(duration); Destroy(newOnomatopoeia); diff --git a/UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs b/UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs index 01eead2e0..1117196cd 100644 --- a/UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs +++ b/UOP1_Project/Assets/Scripts/Audio/VisualisableAudioClip.cs @@ -5,12 +5,12 @@ namespace Assets.Scripts.Audio public class VisualisableAudioClip { public AudioClip Clip; - public Onomatopoeia Onomatopoeia; + public Caption Caption; - public VisualisableAudioClip(AudioClip clip, Onomatopoeia onomatopoeia) + public VisualisableAudioClip(AudioClip clip, Caption caption) { Clip = clip; - Onomatopoeia = onomatopoeia; + Caption = caption; } } } From d4509ca0b753171754d353710cdbe340aa775c03 Mon Sep 17 00:00:00 2001 From: codeedward Date: Wed, 1 Sep 2021 18:42:21 +0200 Subject: [PATCH 04/10] Move captioning into the separate manager class with registration on audio sfx event. Add object pooling. --- ...alization-String-Tables-English (en).asset | 2 +- ...calization-String-Tables-French (fr).asset | 2 +- ...alization-String-Tables-Italian (it).asset | 2 +- .../Onomatopoeia Shared Data.asset | 2 +- ...matopoeia.prefab => CaptionEmitter.prefab} | 15 +++- ...prefab.meta => CaptionEmitter.prefab.meta} | 0 .../9a2333a5072248ea8967890cf9726479.asset | 2 +- .../Scenes/Managers/PersistentManagers.unity | 71 +++++++++++++------ .../NPCs/Bard Hare/SFX_BardHareSingLong.asset | 2 +- .../Bard Hare/SFX_BardHareSingShort.asset | 2 +- .../AudioCues/SFX/Protagonist/SFX_Die.asset | 11 +++ .../SFX/Protagonist/SFX_GettingHit.asset | 11 +++ .../AudioCues/SFX/Protagonist/SFX_Jump.asset | 2 +- .../AudioCues/SFX/Protagonist/SFX_Land.asset | 4 +- .../SFX/Protagonist/SFX_PickUp.asset | 11 +++ .../SFX/Protagonist/SFX_SwingCane.asset | 4 +- .../AudioCues/SFX/Protagonist/SFX_Talk.asset | 11 +++ .../AudioCues/SFX/SFX_Footsteps_Grass.asset | 11 ++- .../AudioCues/SFX/SFX_Footsteps_Sand_A.asset | 8 +-- .../AudioCues/SFX/SFX_Footsteps_Sand_B.asset | 8 +-- .../AudioCues/SFX/SFX_Footsteps_Soil_A.asset | 8 +-- .../AudioCues/SFX/SFX_Footsteps_Soil_B.asset | 8 +-- .../AudioCues/SFX/SFX_Footsteps_Stone_A.asset | 11 +++ .../AudioCues/SFX/SFX_Footsteps_Stone_B.asset | 11 +++ .../Audio/AudioCues/SFX/SFX_Torch.asset | 11 +++ .../Assets/ScriptableObjects/Captioning.meta | 8 +++ .../Captioning/CaptionEmitterFactory.asset | 15 ++++ .../CaptionEmitterFactory.asset.meta | 8 +++ .../Captioning/CaptionEmitterPool.asset | 15 ++++ .../Captioning/CaptionEmitterPool.asset.meta | 8 +++ .../Scripts/Audio/AudioData/AudioCueSO.cs | 2 +- .../Assets/Scripts/Audio/AudioManager.cs | 6 -- .../Scripts/Audio/ClosedCaptioningSystem.cs | 29 -------- UOP1_Project/Assets/Scripts/Captioning.meta | 8 +++ .../Scripts/Captioning/CaptionEmitters.meta | 8 +++ .../CaptionEmitters/CaptionEmitter.cs | 19 +++++ .../CaptionEmitters/CaptionEmitter.cs.meta} | 0 .../CaptionEmitterFactorySO.cs | 16 +++++ .../CaptionEmitterFactorySO.cs.meta | 11 +++ .../CaptionEmitters/CaptionEmitterPoolSO.cs | 26 +++++++ .../CaptionEmitterPoolSO.cs.meta | 11 +++ .../Captioning/ClosedCaptioningManger.cs | 63 ++++++++++++++++ .../Captioning/ClosedCaptioningManger.cs.meta | 11 +++ 43 files changed, 408 insertions(+), 86 deletions(-) rename UOP1_Project/Assets/Prefabs/Audio/{Onomatopoeia.prefab => CaptionEmitter.prefab} (93%) rename UOP1_Project/Assets/Prefabs/Audio/{Onomatopoeia.prefab.meta => CaptionEmitter.prefab.meta} (100%) create mode 100644 UOP1_Project/Assets/ScriptableObjects/Captioning.meta create mode 100644 UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterFactory.asset create mode 100644 UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterFactory.asset.meta create mode 100644 UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterPool.asset create mode 100644 UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterPool.asset.meta delete mode 100644 UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs create mode 100644 UOP1_Project/Assets/Scripts/Captioning.meta create mode 100644 UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters.meta create mode 100644 UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitter.cs rename UOP1_Project/Assets/Scripts/{Audio/ClosedCaptioningSystem.cs.meta => Captioning/CaptionEmitters/CaptionEmitter.cs.meta} (100%) create mode 100644 UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterFactorySO.cs create mode 100644 UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterFactorySO.cs.meta create mode 100644 UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterPoolSO.cs create mode 100644 UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterPoolSO.cs.meta create mode 100644 UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs create mode 100644 UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs.meta diff --git a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset index f5da64e3b..f0fba75bb 100644 --- a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset +++ b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset @@ -65,7 +65,7 @@ MonoBehaviour: - Locale-en - Preload - m_GUID: c09a5a81dffeac540a7dced4c3bbef3d - m_Address: Onomatopoeia_en + m_Address: Caption_en m_ReadOnly: 1 m_SerializedLabels: - Locale-en diff --git a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-French (fr).asset b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-French (fr).asset index ff6c6722d..f385b2061 100644 --- a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-French (fr).asset +++ b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-French (fr).asset @@ -65,7 +65,7 @@ MonoBehaviour: - Locale-fr - Preload - m_GUID: 637939d10d6fe314d8ffe3d0a63c7dd5 - m_Address: Onomatopoeia_fr + m_Address: Caption_fr m_ReadOnly: 1 m_SerializedLabels: - Locale-fr diff --git a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Italian (it).asset b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Italian (it).asset index 39b5e7999..ca685bee9 100644 --- a/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Italian (it).asset +++ b/UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Italian (it).asset @@ -49,7 +49,7 @@ MonoBehaviour: m_SerializedLabels: - Locale-it - m_GUID: 3ef13080fdb719940a37520e887c63e4 - m_Address: Onomatopoeia_it + m_Address: Caption_it m_ReadOnly: 1 m_SerializedLabels: - Locale-it diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset index c7433741b..7a5667418 100644 --- a/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/Onomatopoeia/Onomatopoeia Shared Data.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5b11a58205ec3474ca216360e9fa74a8, type: 3} m_Name: Onomatopoeia Shared Data m_EditorClassIdentifier: - m_TableCollectionName: Onomatopoeia + m_TableCollectionName: Caption m_TableCollectionNameGuidString: d299736136010ec4f926836ea5b14a66 m_Entries: - m_Id: 105602867200 diff --git a/UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab b/UOP1_Project/Assets/Prefabs/Audio/CaptionEmitter.prefab similarity index 93% rename from UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab rename to UOP1_Project/Assets/Prefabs/Audio/CaptionEmitter.prefab index bfd25b1f9..e07ba219f 100644 --- a/UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab +++ b/UOP1_Project/Assets/Prefabs/Audio/CaptionEmitter.prefab @@ -192,8 +192,9 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 6235676119615081003} + - component: {fileID: 9189385818154971046} m_Layer: 0 - m_Name: Onomatopoeia + m_Name: CaptionEmitter m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -214,3 +215,15 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &9189385818154971046 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1657682584543887628} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 65d684353f07ccf409beaa53fa24df9e, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab.meta b/UOP1_Project/Assets/Prefabs/Audio/CaptionEmitter.prefab.meta similarity index 100% rename from UOP1_Project/Assets/Prefabs/Audio/Onomatopoeia.prefab.meta rename to UOP1_Project/Assets/Prefabs/Audio/CaptionEmitter.prefab.meta diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset index 47f5153d0..dcbc2f913 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: 9a2333a5072248ea8967890cf9726479 + m_Name: pb_Mesh-82296 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity b/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity index 86995cfaf..cd770887e 100644 --- a/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity +++ b/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity @@ -179,7 +179,6 @@ GameObject: - component: {fileID: 610459581} - component: {fileID: 610459582} - component: {fileID: 610459583} - - component: {fileID: 610459584} m_Layer: 0 m_Name: AudioManager m_TagString: AudioManager @@ -258,21 +257,6 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 ---- !u!114 &610459584 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 610459580} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 65d684353f07ccf409beaa53fa24df9e, type: 3} - m_Name: - m_EditorClassIdentifier: - OnomatopoeiaPrefab: {fileID: 1657682584543887628, guid: 544279658fa0bb945a4c07d654ea6f4c, - type: 3} - _SFXEventChannel: {fileID: 11400000, guid: c3c796b7c31ad3647a3fbae42e74764e, type: 2} --- !u!1 &740063860 GameObject: m_ObjectHideFlags: 0 @@ -317,7 +301,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &819074216 PrefabInstance: @@ -329,7 +313,7 @@ PrefabInstance: - target: {fileID: 4398103872695503857, guid: f3351fde0c1164c1da695b12e67d8675, type: 3} propertyPath: m_RootOrder - value: 6 + value: 7 objectReference: {fileID: 0} - target: {fileID: 4398103872695503857, guid: f3351fde0c1164c1da695b12e67d8675, type: 3} @@ -465,6 +449,53 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 841012433} m_CullTransparentMesh: 0 +--- !u!1 &888255706 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 888255708} + - component: {fileID: 888255707} + m_Layer: 0 + m_Name: CloseCaptioningManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &888255707 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 888255706} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8c31ba6886f25db4ebf5bd2ab7c14e24, type: 3} + m_Name: + m_EditorClassIdentifier: + _factory: {fileID: 11400000, guid: b8afea2e327afa449a279042da9505b7, type: 2} + _pool: {fileID: 11400000, guid: db3212ef0dc655a439b72b3b1c02b172, type: 2} + _initialSize: 10 + _SFXEventChannel: {fileID: 11400000, guid: c3c796b7c31ad3647a3fbae42e74764e, type: 2} +--- !u!4 &888255708 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 888255706} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1122701836 GameObject: m_ObjectHideFlags: 0 @@ -508,7 +539,7 @@ Transform: m_LocalScale: {x: 0.85714287, y: 0.85714287, z: 0.85714287} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1260877634 GameObject: @@ -765,7 +796,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1424775818 MonoBehaviour: diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingLong.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingLong.asset index 161abe505..54f7e9a08 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingLong.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingLong.asset @@ -19,7 +19,7 @@ MonoBehaviour: - {fileID: 8300000, guid: facbfb134e075e94a8e1c2c65848224d, type: 3} - {fileID: 8300000, guid: a00b5be1b60d89a4898b123f275a9ace, type: 3} - {fileID: 8300000, guid: 2878f6d9831a0ed41bcc57f175c20785, type: 3} - Onomatopoeia: + Caption: Visualise: 1 SoundText: m_TableReference: diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingShort.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingShort.asset index 31b37c9be..87274032b 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingShort.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/NPCs/Bard Hare/SFX_BardHareSingShort.asset @@ -25,7 +25,7 @@ MonoBehaviour: - {fileID: 8300000, guid: 4fe92c8d34b05ea468feb98a3c7c3e7d, type: 3} - {fileID: 8300000, guid: e01575ef724421848bd0a1ce836ab938, type: 3} - {fileID: 8300000, guid: 191f45089816a0e4ca159973f3ac2597, type: 3} - Onomatopoeia: + Caption: Visualise: 1 SoundText: m_TableReference: diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Die.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Die.asset index fede3ab1a..29cc8545f 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Die.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Die.asset @@ -17,3 +17,14 @@ MonoBehaviour: - sequenceMode: 0 audioClips: - {fileID: 8300000, guid: 4d3b212b82e5da64181c30a947b3fa95, type: 3} + Caption: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_GettingHit.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_GettingHit.asset index cdce529ac..b6d4c7f7d 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_GettingHit.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_GettingHit.asset @@ -19,3 +19,14 @@ MonoBehaviour: - {fileID: 8300000, guid: 6485b0613e09d8442a3b37f0b0067175, type: 3} - {fileID: 8300000, guid: 436973a7ec392fc4a85b385763ee85ad, type: 3} - {fileID: 8300000, guid: 1d80f93579a474246bc6a248de81bbad, type: 3} + Caption: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Jump.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Jump.asset index c0c96cd67..a6a36f832 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Jump.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Jump.asset @@ -18,7 +18,7 @@ MonoBehaviour: audioClips: - {fileID: 8300000, guid: a068a030a7c9261409c84c54bdc0cb1e, type: 3} - {fileID: 8300000, guid: 4cca136af1e6a7741a94f95697a6746a, type: 3} - Onomatopoeia: + Caption: Visualise: 0 SoundText: m_TableReference: diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset index b3373d771..c5e298a8e 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset @@ -17,8 +17,8 @@ MonoBehaviour: - sequenceMode: 2 audioClips: - {fileID: 8300000, guid: e0e1785c8995b62439473ff886ea115d, type: 3} - Onomatopoeia: - Visualise: 1 + Caption: + Visualise: 0 SoundText: m_TableReference: m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_PickUp.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_PickUp.asset index b2d2c4850..822d28f89 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_PickUp.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_PickUp.asset @@ -17,3 +17,14 @@ MonoBehaviour: - sequenceMode: 2 audioClips: - {fileID: 8300000, guid: ebe62aa9d56af6e44a3f25c5cd0da0e5, type: 3} + Caption: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset index 25bad1383..0186b32a1 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset @@ -19,8 +19,8 @@ MonoBehaviour: - {fileID: 8300000, guid: d083bbbea46310b49b4f2bc825da3356, type: 3} - {fileID: 8300000, guid: c9e9f3c13ca8a2449b95437d67506110, type: 3} - {fileID: 8300000, guid: 9b8b36841533b9f46875b542d77513b8, type: 3} - Onomatopoeia: - Visualise: 1 + Caption: + Visualise: 0 SoundText: m_TableReference: m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Talk.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Talk.asset index 868a19af4..be1e9d8da 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Talk.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Talk.asset @@ -28,3 +28,14 @@ MonoBehaviour: - {fileID: 8300000, guid: e254e4ae0aa8bfb45bc402b3ed72bfb6, type: 3} - {fileID: 8300000, guid: a9596cf534c2abd40b7216a4bb3a0578, type: 3} - {fileID: 8300000, guid: 7a36d256849e7054a8517f690ab9e591, type: 3} + Caption: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Grass.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Grass.asset index 95b96c691..957c67723 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Grass.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Grass.asset @@ -29,5 +29,14 @@ MonoBehaviour: - {fileID: 8300000, guid: cefc29d2c12eeae46891b0ad4c1b4369, type: 3} - {fileID: 8300000, guid: bec5e9373333fd646a6a5d233dff824e, type: 3} - {fileID: 8300000, guid: 0d879f2aa67ca1043b30ee86c6786571, type: 3} - Onomatopoeia: + Caption: Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_A.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_A.asset index bdbb261a1..813cd59db 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_A.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_A.asset @@ -29,14 +29,14 @@ MonoBehaviour: - {fileID: 8300000, guid: f46bf6da4c69f354ea98ad5754eabd97, type: 3} - {fileID: 8300000, guid: 6ffffcb76591869429c028d9ca627e5e, type: 3} - {fileID: 8300000, guid: 1180216b6dd787b4fbb232fbf0d388b9, type: 3} - Onomatopoeia: + Caption: Visualise: 0 SoundText: m_TableReference: - m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableCollectionName: m_TableEntryReference: - m_KeyId: 105602867200 + m_KeyId: 0 m_Key: m_FallbackState: 0 m_WaitForCompletion: 1 - Duration: 0.5 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_B.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_B.asset index bccc2f2db..db706feb7 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_B.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Sand_B.asset @@ -36,14 +36,14 @@ MonoBehaviour: - {fileID: 8300000, guid: a1bd2fdc9873e7f4e9bd3b0fe730f0fa, type: 3} - {fileID: 8300000, guid: 89a063162ec0f064a81397c3192140b8, type: 3} - {fileID: 8300000, guid: 65b8763d9bd257244800ae763bd95fb4, type: 3} - Onomatopoeia: + Caption: Visualise: 0 SoundText: m_TableReference: - m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableCollectionName: m_TableEntryReference: - m_KeyId: 105602867200 + m_KeyId: 0 m_Key: m_FallbackState: 0 m_WaitForCompletion: 1 - Duration: 0.5 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_A.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_A.asset index e50105f6c..dbeef394b 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_A.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_A.asset @@ -43,14 +43,14 @@ MonoBehaviour: - {fileID: 8300000, guid: 4bf5da42a1fc24a4580a6ff3e4fa70f0, type: 3} - {fileID: 8300000, guid: a1f7619f9aded4a4d93bd329e09e45a2, type: 3} - {fileID: 8300000, guid: 3c663be68d928a44eb3b16ce81b2e4a5, type: 3} - Onomatopoeia: + Caption: Visualise: 0 SoundText: m_TableReference: - m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableCollectionName: m_TableEntryReference: - m_KeyId: 105602867200 + m_KeyId: 0 m_Key: m_FallbackState: 0 m_WaitForCompletion: 1 - Duration: 0.5 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_B.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_B.asset index 0f04dfb4a..7eac6f706 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_B.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Soil_B.asset @@ -29,14 +29,14 @@ MonoBehaviour: - {fileID: 8300000, guid: e51d9830248780448a0433673c4372b9, type: 3} - {fileID: 8300000, guid: a53434d92f6708b48be8321cec13975c, type: 3} - {fileID: 8300000, guid: c63a93a4c56b8464ea093e8b9411dc94, type: 3} - Onomatopoeia: + Caption: Visualise: 0 SoundText: m_TableReference: - m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 + m_TableCollectionName: m_TableEntryReference: - m_KeyId: 105602867200 + m_KeyId: 0 m_Key: m_FallbackState: 0 m_WaitForCompletion: 1 - Duration: 0.5 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Stone_A.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Stone_A.asset index 6e851f54d..00288e383 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Stone_A.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Stone_A.asset @@ -36,3 +36,14 @@ MonoBehaviour: - {fileID: 8300000, guid: efac7650e32f7de46a6f6542ad20c0ac, type: 3} - {fileID: 8300000, guid: c0fbb1d347da98b4daa580d2e4414745, type: 3} - {fileID: 8300000, guid: c56f569cbc8d5634e9ac2d7e74a6d419, type: 3} + Caption: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Stone_B.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Stone_B.asset index 2afa99c4f..b74d501ec 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Stone_B.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Footsteps_Stone_B.asset @@ -46,3 +46,14 @@ MonoBehaviour: - {fileID: 8300000, guid: 560d4f29d9a51f4499db04272845a0a8, type: 3} - {fileID: 8300000, guid: 1d2622eb34106874eb8ceb1b48de27cc, type: 3} - {fileID: 8300000, guid: 1439bc1ec795f684c909663dbd26c6fa, type: 3} + Caption: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Torch.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Torch.asset index 4f59e1149..c8a0f3f24 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Torch.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_Torch.asset @@ -17,3 +17,14 @@ MonoBehaviour: - sequenceMode: 2 audioClips: - {fileID: 8300000, guid: f49cdea4e85b04641945385e5107c1c1, type: 3} + Caption: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 1 diff --git a/UOP1_Project/Assets/ScriptableObjects/Captioning.meta b/UOP1_Project/Assets/ScriptableObjects/Captioning.meta new file mode 100644 index 000000000..aa8eed326 --- /dev/null +++ b/UOP1_Project/Assets/ScriptableObjects/Captioning.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 027e04a76dc4aea45a8044adc4f5e01f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterFactory.asset b/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterFactory.asset new file mode 100644 index 000000000..54f2e68a0 --- /dev/null +++ b/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterFactory.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +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: 64b4204fe039815468f479d347cbfddf, type: 3} + m_Name: CaptionEmitterFactory + m_EditorClassIdentifier: + prefab: {fileID: 9189385818154971046, guid: 544279658fa0bb945a4c07d654ea6f4c, type: 3} diff --git a/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterFactory.asset.meta b/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterFactory.asset.meta new file mode 100644 index 000000000..494261eda --- /dev/null +++ b/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterFactory.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b8afea2e327afa449a279042da9505b7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterPool.asset b/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterPool.asset new file mode 100644 index 000000000..4c7e7dea3 --- /dev/null +++ b/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterPool.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +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: 8602bafd38d7b3d4cb30f25090df81cf, type: 3} + m_Name: CaptionEmitterPool + m_EditorClassIdentifier: + _factory: {fileID: 11400000, guid: b8afea2e327afa449a279042da9505b7, type: 2} diff --git a/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterPool.asset.meta b/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterPool.asset.meta new file mode 100644 index 000000000..3f82af431 --- /dev/null +++ b/UOP1_Project/Assets/ScriptableObjects/Captioning/CaptionEmitterPool.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: db3212ef0dc655a439b72b3b1c02b172 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs b/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs index 76f146100..600b7a664 100644 --- a/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs +++ b/UOP1_Project/Assets/Scripts/Audio/AudioData/AudioCueSO.cs @@ -93,7 +93,7 @@ public enum SequenceMode [Serializable] public class Caption { - public bool Visualise = true; + public bool Visualise = false; public LocalizedString SoundText; public float Duration = 1f; } diff --git a/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs b/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs index 6d5c79a3c..60d6d294b 100644 --- a/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs +++ b/UOP1_Project/Assets/Scripts/Audio/AudioManager.cs @@ -199,12 +199,6 @@ public AudioCueKey PlayAudioCue(AudioCueSO audioCue, AudioConfigurationSO settin { soundEmitterArray[i].OnSoundFinishedPlaying += OnSoundEmitterFinishedPlaying; } - - if (clipsToPlay[i].Caption.Visualise && !audioCue.looping) - { - var captioningSystem = this.GetComponent(); - captioningSystem.VisualiseAudioClip(clipsToPlay[i].Caption, position); - } } } diff --git a/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs b/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs deleted file mode 100644 index 2e6bfbd2c..000000000 --- a/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Collections; -using TMPro; -using UnityEngine; - -namespace Assets.Scripts.Audio -{ - public class ClosedCaptioningSystem : MonoBehaviour - { - public GameObject CaptionPrefab; - - public void VisualiseAudioClip(Caption caption, Vector3 position = default) - { - var newCaption = Instantiate(CaptionPrefab, position, Quaternion.identity); - var captionTextComponent = newCaption.GetComponentInChildren(); - - if (!string.IsNullOrEmpty(caption.SoundText.TableReference)) - { - captionTextComponent.text = caption.SoundText.GetLocalizedString(); - } - StartCoroutine(DestroyNewCaption(newCaption, caption.Duration)); - } - - IEnumerator DestroyNewCaption(GameObject newOnomatopoeia, float duration) - { - yield return new WaitForSeconds(duration); - Destroy(newOnomatopoeia); - } - } -} diff --git a/UOP1_Project/Assets/Scripts/Captioning.meta b/UOP1_Project/Assets/Scripts/Captioning.meta new file mode 100644 index 000000000..71960350c --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cb0b29a5915351842973b2a76d317c5e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters.meta b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters.meta new file mode 100644 index 000000000..d7e7208c7 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ed6f03f28a292b428336c22df9db6e8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitter.cs b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitter.cs new file mode 100644 index 000000000..7abc2525c --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitter.cs @@ -0,0 +1,19 @@ +using TMPro; +using UnityEngine; + +namespace Assets.Scripts.Captioning.CaptionEmitters +{ + public class CaptionEmitter : MonoBehaviour + { + public void Display(Caption caption, Vector3 position = default) + { + transform.position = position; + var captionTextComponent = GetComponentInChildren(); + + if (!string.IsNullOrEmpty(caption.SoundText.TableReference)) + { + captionTextComponent.text = caption.SoundText.GetLocalizedString(); + } + } + } +} diff --git a/UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs.meta b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitter.cs.meta similarity index 100% rename from UOP1_Project/Assets/Scripts/Audio/ClosedCaptioningSystem.cs.meta rename to UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitter.cs.meta diff --git a/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterFactorySO.cs b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterFactorySO.cs new file mode 100644 index 000000000..2bf779f1c --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterFactorySO.cs @@ -0,0 +1,16 @@ +using UnityEngine; +using UOP1.Factory; + +namespace Assets.Scripts.Captioning.CaptionEmitters +{ + [CreateAssetMenu(fileName = "NewCaptionEmitterFactory", menuName = "Factory/CaptionEmitter Factory")] + public class CaptionEmitterFactorySO : FactorySO + { + public CaptionEmitter prefab = default; + + public override CaptionEmitter Create() + { + return Instantiate(prefab); + } + } +} diff --git a/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterFactorySO.cs.meta b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterFactorySO.cs.meta new file mode 100644 index 000000000..674b517e8 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterFactorySO.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 64b4204fe039815468f479d347cbfddf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterPoolSO.cs b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterPoolSO.cs new file mode 100644 index 000000000..c87cdc9fe --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterPoolSO.cs @@ -0,0 +1,26 @@ +using UnityEngine; +using UOP1.Factory; +using UOP1.Pool; + +namespace Assets.Scripts.Captioning.CaptionEmitters +{ + [CreateAssetMenu(fileName = "NewCaptionEmitterPool", menuName = "Pool/CaptionEmitter Pool")] + public class CaptionEmitterPoolSO : ComponentPoolSO + { + [SerializeField] + private CaptionEmitterFactorySO _factory; + + public override IFactory Factory + { + get + { + return _factory; + } + set + { + _factory = value as CaptionEmitterFactorySO; + } + } + } + +} diff --git a/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterPoolSO.cs.meta b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterPoolSO.cs.meta new file mode 100644 index 000000000..70fcf7571 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitterPoolSO.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8602bafd38d7b3d4cb30f25090df81cf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs new file mode 100644 index 000000000..6861a6872 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs @@ -0,0 +1,63 @@ +using Assets.Scripts.Captioning.CaptionEmitters; +using System.Collections; +using UnityEngine; + +namespace Assets.Scripts.Audio +{ + public class ClosedCaptioningManger : MonoBehaviour + { + [Header("SoundEmitters pool")] + [SerializeField] private CaptionEmitterFactorySO _factory = default; + [SerializeField] private CaptionEmitterPoolSO _pool = default; + [SerializeField] private int _initialSize = 10; + + [Header("Listening on channels")] + [Tooltip("The ClosedCaptioningManger listens to this event, fired by objects in any scene, to display text for the SFXs")] + [SerializeField] private AudioCueEventChannelSO _SFXEventChannel = default; + + private void Awake() + { + _pool.Prewarm(_initialSize); + _pool.SetParent(this.transform); + } + + private void OnEnable() + { + _SFXEventChannel.OnAudioCuePlayRequested += DisplayCaption; + } + + private void OnDestroy() + { + _SFXEventChannel.OnAudioCuePlayRequested -= DisplayCaption; + } + + public AudioCueKey DisplayCaption(AudioCueSO audioCue, AudioConfigurationSO settings, Vector3 position = default) + { + VisualisableAudioClip[] clipsToPlay = audioCue.GetClips(); + CaptionEmitter[] captionEmitterArray = new CaptionEmitter[clipsToPlay.Length]; + + int nOfClips = clipsToPlay.Length; + for (int i = 0; i < nOfClips; i++) + { + var currentAudioCaption = clipsToPlay[i].Caption; + if (currentAudioCaption.Visualise && !audioCue.looping) + { + captionEmitterArray[i] = _pool.Request(); + if (captionEmitterArray[i] != null) + { + captionEmitterArray[i].Display(currentAudioCaption, position); + StartCoroutine(CleanEmitter(captionEmitterArray[i], currentAudioCaption.Duration)); + } + } + } + + return default; + } + + private IEnumerator CleanEmitter(CaptionEmitter captionEmitter, float duration) + { + yield return new WaitForSeconds(duration); + _pool.Return(captionEmitter); + } + } +} diff --git a/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs.meta b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs.meta new file mode 100644 index 000000000..7dc3bca09 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8c31ba6886f25db4ebf5bd2ab7c14e24 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 0ffcdb3dea929e28d2b4c717ee79edce02aa39e9 Mon Sep 17 00:00:00 2001 From: codeedward Date: Sat, 4 Sep 2021 17:56:51 +0100 Subject: [PATCH 05/10] Add captioning to the Language menu in settings. --- .../AssetTables/UI/UI Misc Shared Data.asset | 12 + .../AssetTables/UI/UI Misc_en.asset | 12 + .../AssetTables/UI/UI Misc_fr.asset | 8 + .../9a2333a5072248ea8967890cf9726479.asset | 2 +- .../Assets/Scenes/Managers/Gameplay.unity | 244 +++++++++++++++--- .../AudioCues/SFX/Protagonist/SFX_Land.asset | 2 +- .../SFX/Protagonist/SFX_SwingCane.asset | 4 +- .../Assets/Scripts/SaveSystem/Save.cs | 2 + .../Scripts/Systems/Settings/SettingsSO.cs | 8 +- .../Settings/UISettingsGraphicsComponent.cs | 1 - .../Settings/UISettingsLanguageComponent.cs | 53 +++- .../UI/Settings/UISettingFieldsFiller.cs | 3 + .../UI/Settings/UISettingsController.cs | 9 +- 13 files changed, 311 insertions(+), 49 deletions(-) diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc Shared Data.asset b/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc Shared Data.asset index 1c752c9b5..960bf1f19 100644 --- a/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc Shared Data.asset +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc Shared Data.asset @@ -267,6 +267,18 @@ MonoBehaviour: m_Key: Language m_Metadata: m_Items: [] + - m_Id: 39863313582776320 + m_Key: Captioning + m_Metadata: + m_Items: [] + - m_Id: 39863497532366848 + m_Key: Captioning_On + m_Metadata: + m_Items: [] + - m_Id: 39863525374156800 + m_Key: Captioning_Off + m_Metadata: + m_Items: [] m_Metadata: m_Items: [] m_KeyGenerator: diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc_en.asset b/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc_en.asset index 509baf3b4..7c41308cb 100644 --- a/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc_en.asset +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc_en.asset @@ -273,5 +273,17 @@ MonoBehaviour: m_Localized: Music Volume m_Metadata: m_Items: [] + - m_Id: 39863313582776320 + m_Localized: Captioning + m_Metadata: + m_Items: [] + - m_Id: 39863497532366848 + m_Localized: On + m_Metadata: + m_Items: [] + - m_Id: 39863525374156800 + m_Localized: Off + m_Metadata: + m_Items: [] references: version: 1 diff --git a/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc_fr.asset b/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc_fr.asset index 4d24bb2e0..0a17a301f 100644 --- a/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc_fr.asset +++ b/UOP1_Project/Assets/LocalizationFiles/AssetTables/UI/UI Misc_fr.asset @@ -239,5 +239,13 @@ MonoBehaviour: m_Localized: Volume de la musique m_Metadata: m_Items: [] + - m_Id: 39863497532366848 + m_Localized: "Activ\xE9" + m_Metadata: + m_Items: [] + - m_Id: 39863525374156800 + m_Localized: "Desactiv\xE9" + m_Metadata: + m_Items: [] references: version: 1 diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset index dcbc2f913..9549860ae 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-82296 + m_Name: pb_Mesh-81552 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity b/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity index 2ce20d8c2..0d2ae8a19 100644 --- a/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity +++ b/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.12731749, g: 0.13414757, b: 0.1210787, a: 1} + m_IndirectSpecularColor: {r: 0, g: 0.99999905, b: 0.99999905, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -145,27 +145,27 @@ PrefabInstance: - target: {fileID: 488774219352206458, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 488774219352206458, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 488774219352206458, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 100 objectReference: {fileID: 0} - target: {fileID: 488774219352206458, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 788.03174 objectReference: {fileID: 0} - target: {fileID: 488774219352206458, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -50 objectReference: {fileID: 0} - target: {fileID: 488774219553061920, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} @@ -357,6 +357,11 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: -50 objectReference: {fileID: 0} + - target: {fileID: 2210817385620037417, guid: cef07ea384e17ef4bb3abfbd08391f33, + type: 3} + propertyPath: _captioningField + value: + objectReference: {fileID: 1222135179} - target: {fileID: 2284335988535224422, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMax.y @@ -385,27 +390,27 @@ PrefabInstance: - target: {fileID: 2296573752810023457, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2296573752810023457, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2296573752810023457, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 1248 objectReference: {fileID: 0} - target: {fileID: 2296573752810023457, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 624 objectReference: {fileID: 0} - target: {fileID: 2296573752810023457, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -129.5 objectReference: {fileID: 0} - target: {fileID: 2783648922824695131, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} @@ -545,7 +550,7 @@ PrefabInstance: - target: {fileID: 4419775157188859448, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_SizeDelta.y - value: 73 + value: 166 objectReference: {fileID: 0} - target: {fileID: 4419775157188859448, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} @@ -555,7 +560,7 @@ PrefabInstance: - target: {fileID: 4419775157188859448, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.y - value: -36.5 + value: -83 objectReference: {fileID: 0} - target: {fileID: 4786167613486004739, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} @@ -580,7 +585,7 @@ PrefabInstance: - target: {fileID: 4786167613486004739, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.y - value: -173 + value: -788.39996 objectReference: {fileID: 0} - target: {fileID: 4881546387008789613, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} @@ -610,52 +615,52 @@ PrefabInstance: - target: {fileID: 5437310083346915326, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 5437310083346915326, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 5437310083346915326, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 1248 objectReference: {fileID: 0} - target: {fileID: 5437310083346915326, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 624 objectReference: {fileID: 0} - target: {fileID: 5437310083346915326, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -36.5 objectReference: {fileID: 0} - target: {fileID: 6250465520573680223, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 6250465520573680223, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 6250465520573680223, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 1248 objectReference: {fileID: 0} - target: {fileID: 6250465520573680223, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 624 objectReference: {fileID: 0} - target: {fileID: 6250465520573680223, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -222.5 objectReference: {fileID: 0} - target: {fileID: 6825131797341510134, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} @@ -755,57 +760,57 @@ PrefabInstance: - target: {fileID: 8458125608585290032, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.y - value: -359 + value: -788.39996 objectReference: {fileID: 0} - target: {fileID: 8698515608629574386, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 8698515608629574386, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 8698515608629574386, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 100 objectReference: {fileID: 0} - target: {fileID: 8698515608629574386, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 153.60635 objectReference: {fileID: 0} - target: {fileID: 8698515608629574386, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -50 objectReference: {fileID: 0} - target: {fileID: 8698515608660556847, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 8698515608660556847, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 8698515608660556847, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 100 objectReference: {fileID: 0} - target: {fileID: 8698515608660556847, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 470.81906 objectReference: {fileID: 0} - target: {fileID: 8698515608660556847, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -50 objectReference: {fileID: 0} - target: {fileID: 9195418722625875733, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} @@ -830,7 +835,7 @@ PrefabInstance: - target: {fileID: 9195418722625875733, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchoredPosition.y - value: -452 + value: -788.39996 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} @@ -852,6 +857,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: eaa1d1bcaa3ee4cf0af311e19f20e9ed, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!224 &978261887 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4419775157188859448, guid: cef07ea384e17ef4bb3abfbd08391f33, + type: 3} + m_PrefabInstance: {fileID: 978261884} + m_PrefabAsset: {fileID: 0} --- !u!224 &1172743537 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 9125883718042355530, guid: 42ed5ae1f90714c4488cfabda2298591, @@ -870,6 +881,167 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 24b948a9bd4284c4ab2089bf06c7f20c, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1001 &1222135178 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 978261887} + m_Modifications: + - target: {fileID: 1194130716540896082, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_Navigation.m_SelectOnDown + value: + objectReference: {fileID: 0} + - target: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: _fieldType + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_SizeDelta.x + value: 1248 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_SizeDelta.y + value: 73 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 624 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -129.5 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854745, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_Name + value: Setting_Item_Captioning + objectReference: {fileID: 0} + - target: {fileID: 8646458778101552516, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_Navigation.m_SelectOnDown + value: + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: bfbbc6fd7e74c4e288fdadc2265eef46, type: 3} +--- !u!114 &1222135179 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + m_PrefabInstance: {fileID: 1222135178} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 02a6bc9a95af04bb2824645c3268e511, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &1479900141 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset index c5e298a8e..c43ce4805 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_Land.asset @@ -18,7 +18,7 @@ MonoBehaviour: audioClips: - {fileID: 8300000, guid: e0e1785c8995b62439473ff886ea115d, type: 3} Caption: - Visualise: 0 + Visualise: 1 SoundText: m_TableReference: m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset index 0186b32a1..a869dc26e 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/Protagonist/SFX_SwingCane.asset @@ -20,7 +20,7 @@ MonoBehaviour: - {fileID: 8300000, guid: c9e9f3c13ca8a2449b95437d67506110, type: 3} - {fileID: 8300000, guid: 9b8b36841533b9f46875b542d77513b8, type: 3} Caption: - Visualise: 0 + Visualise: 1 SoundText: m_TableReference: m_TableCollectionName: GUID:d299736136010ec4f926836ea5b14a66 @@ -29,4 +29,4 @@ MonoBehaviour: m_Key: m_FallbackState: 0 m_WaitForCompletion: 1 - Duration: 1 + Duration: 0.5 diff --git a/UOP1_Project/Assets/Scripts/SaveSystem/Save.cs b/UOP1_Project/Assets/Scripts/SaveSystem/Save.cs index 0ebdd4ac7..5ca609707 100644 --- a/UOP1_Project/Assets/Scripts/SaveSystem/Save.cs +++ b/UOP1_Project/Assets/Scripts/SaveSystem/Save.cs @@ -26,6 +26,7 @@ public class Save public float _shadowDistance = default; public bool _isFullscreen = default; public Locale _currentLocale = default; + public bool _isCaptioningEnabled = default; public void SaveSettings(SettingsSO settings) { @@ -37,6 +38,7 @@ public void SaveSettings(SettingsSO settings) _shadowDistance = settings.ShadowDistance; _isFullscreen = settings.IsFullscreen; _currentLocale = settings.CurrentLocale; + _isCaptioningEnabled = settings.IsCaptioningEnabled; } public string ToJson() { diff --git a/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSO.cs b/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSO.cs index e81eedcb1..91e9fe2a6 100644 --- a/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSO.cs +++ b/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSO.cs @@ -12,14 +12,16 @@ public class SettingsSO : ScriptableObject [SerializeField] float _shadowDistance = default; [SerializeField] bool _isFullscreen = default; [SerializeField] Locale _currentLocale = default; + [SerializeField] bool _isCaptioningEnabled = default; public float MasterVolume => _masterVolume; public float MusicVolume => _musicVolume; public float SfxVolume => _sfxVolume; public int ResolutionsIndex => _resolutionsIndex; public int AntiAliasingIndex => _antiAliasingIndex; public float ShadowDistance => _shadowDistance; - public bool IsFullscreen => _isFullscreen; + public bool IsFullscreen => _isFullscreen; public Locale CurrentLocale => _currentLocale; + public bool IsCaptioningEnabled => _isCaptioningEnabled; public void SaveAudioSettings(float newMusicVolume, float newSfxVolume, float newMasterVolume) { _masterVolume = newMasterVolume; @@ -33,9 +35,10 @@ public void SaveGraphicsSettings(int newResolutionsIndex, int newAntiAliasingInd _shadowDistance = newShadowDistance; _isFullscreen = fullscreenState; } - public void SaveLanguageSettings(Locale local) + public void SaveLanguageSettings(Locale local, bool isCaptioningEnabled) { _currentLocale = local; + _isCaptioningEnabled = isCaptioningEnabled; } public SettingsSO() { } public void LoadSavedSettings(Save savedFile) @@ -48,5 +51,6 @@ public void LoadSavedSettings(Save savedFile) _shadowDistance = savedFile._shadowDistance; _isFullscreen = savedFile._isFullscreen; _currentLocale = savedFile._currentLocale; + _isCaptioningEnabled = savedFile._isCaptioningEnabled; } } diff --git a/UOP1_Project/Assets/Scripts/Systems/Settings/UISettingsGraphicsComponent.cs b/UOP1_Project/Assets/Scripts/Systems/Settings/UISettingsGraphicsComponent.cs index a57e051a0..5843b863c 100644 --- a/UOP1_Project/Assets/Scripts/Systems/Settings/UISettingsGraphicsComponent.cs +++ b/UOP1_Project/Assets/Scripts/Systems/Settings/UISettingsGraphicsComponent.cs @@ -211,7 +211,6 @@ void SetFullscreen() { _fullscreenField.FillSettingField_Localized(2, 0, "Off"); } - } bool GetCurrentFullscreenState() { diff --git a/UOP1_Project/Assets/Scripts/Systems/Settings/UISettingsLanguageComponent.cs b/UOP1_Project/Assets/Scripts/Systems/Settings/UISettingsLanguageComponent.cs index d67b409a7..d33fcf232 100644 --- a/UOP1_Project/Assets/Scripts/Systems/Settings/UISettingsLanguageComponent.cs +++ b/UOP1_Project/Assets/Scripts/Systems/Settings/UISettingsLanguageComponent.cs @@ -17,13 +17,18 @@ public class UISettingsLanguageComponent : MonoBehaviour AsyncOperationHandle m_InitializeOperation; List languageList = new List(); - public event UnityAction _save = delegate { }; + public event UnityAction _save = delegate { }; private int _currentSelectedOption = 0; private int _savedSelectedOption = default; + [SerializeField] private UISettingItemFiller _captioningField = default; + private bool _isCaptioningEnabled = default; + private bool _savedIsCaptioningEnabled = default; + [SerializeField] private UIGenericButton _saveButton; [SerializeField] private UIGenericButton _resetButton; + void OnEnable() { m_InitializeOperation = LocalizationSettings.SelectedLocaleAsync; @@ -37,8 +42,12 @@ void OnEnable() } _saveButton.Clicked += SaveSettings; _resetButton.Clicked += ResetSettings; + _languageField._nextOption += NextOption; _languageField._previousOption += PreviousOption; + + _captioningField._nextOption += NextIsCaptioningEnabledState; + _captioningField._previousOption += PreviousIsCaptioningEnabledState; } private void OnDisable() { @@ -51,6 +60,14 @@ private void OnDisable() LocalizationSettings.SelectedLocaleChanged -= LocalizationSettings_SelectedLocaleChanged; } + public void Setup(bool isCaptioningEnabled) + { + _isCaptioningEnabled = isCaptioningEnabled; + _savedIsCaptioningEnabled = _isCaptioningEnabled; + + SetCaptioning(); + } + void InitializeCompleted(AsyncOperationHandle obj) { m_InitializeOperation.Completed -= InitializeCompleted; @@ -109,12 +126,44 @@ public void SaveSettings() { Locale _currentLocale = LocalizationSettings.AvailableLocales.Locales[_currentSelectedOption]; _savedSelectedOption = _currentSelectedOption; - _save.Invoke(_currentLocale); + _savedIsCaptioningEnabled = _isCaptioningEnabled; + _save.Invoke(_currentLocale, _isCaptioningEnabled); } public void ResetSettings() { _currentSelectedOption = _savedSelectedOption; OnSelectionChanged(); + + _isCaptioningEnabled = _savedIsCaptioningEnabled; + OnCaptioningChange(); } + #region IsCaptioningEnabled + void NextIsCaptioningEnabledState() + { + _isCaptioningEnabled = true; + OnCaptioningChange(); + } + void PreviousIsCaptioningEnabledState() + { + _isCaptioningEnabled = false; + OnCaptioningChange(); + } + void OnCaptioningChange() + { + SetCaptioning(); + } + + private void SetCaptioning() + { + if (_isCaptioningEnabled) + { + _captioningField.FillSettingField_Localized(2, 1, "On"); + } + else + { + _captioningField.FillSettingField_Localized(2, 0, "Off"); + } + } + #endregion } diff --git a/UOP1_Project/Assets/Scripts/UI/Settings/UISettingFieldsFiller.cs b/UOP1_Project/Assets/Scripts/UI/Settings/UISettingFieldsFiller.cs index 60fc083d3..a05d01c51 100644 --- a/UOP1_Project/Assets/Scripts/UI/Settings/UISettingFieldsFiller.cs +++ b/UOP1_Project/Assets/Scripts/UI/Settings/UISettingFieldsFiller.cs @@ -54,6 +54,9 @@ public void SetField(SettingField field, UISettingItemFiller uiField) else selectedOption = "Off"; break; + case SettingFieldType.Captioning: + paginationCount = 2; + break; case SettingFieldType.ShadowDistance: break; diff --git a/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs b/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs index 989637081..69083e891 100644 --- a/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs +++ b/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs @@ -17,6 +17,7 @@ public enum SettingFieldType AntiAliasing, ShadowQuality, Volume_Master, + Captioning } [System.Serializable] @@ -89,7 +90,8 @@ void OpenSetting(SettingsType settingType) switch (settingType) { case SettingsType.Language: - _currentSettings.SaveLanguageSettings(_currentSettings.CurrentLocale); + _currentSettings.SaveLanguageSettings(_currentSettings.CurrentLocale, _currentSettings.IsCaptioningEnabled); + _languageComponent.Setup(_currentSettings.IsCaptioningEnabled); break; case SettingsType.Graphics: _graphicsComponent.Setup(); @@ -109,7 +111,6 @@ void OpenSetting(SettingsType settingType) } void SwitchTab(float orientation) { - if (orientation != 0) { bool isLeft = orientation < 0; @@ -131,9 +132,9 @@ void SwitchTab(float orientation) OpenSetting(_settingTabsList[initialIndex]); } } - public void SaveLaguageSettings(Locale local) + public void SaveLaguageSettings(Locale local, bool isCaptioningEnabled) { - _currentSettings.SaveLanguageSettings(local); + _currentSettings.SaveLanguageSettings(local, isCaptioningEnabled); SaveSettingsEvent.RaiseEvent(); } public void SaveGraphicsSettings(int newResolutionsIndex, int newAntiAliasingIndex, float newShadowDistance, bool fullscreenState) From dd4edfe3d2b13792ad96cb0b3346f0defd825cc0 Mon Sep 17 00:00:00 2001 From: codeedward Date: Sat, 4 Sep 2021 20:04:06 +0100 Subject: [PATCH 06/10] Use captioning from settings in the game. --- .../9a2333a5072248ea8967890cf9726479.asset | 2 +- .../Assets/Scenes/Managers/Gameplay.unity | 6 +++ .../Scenes/Managers/PersistentManagers.unity | 4 ++ .../ChangeCaptioningIsEnable_Channel.asset | 14 +++++++ ...hangeCaptioningIsEnable_Channel.asset.meta | 8 ++++ .../Captioning/ClosedCaptioningManger.cs | 38 +++++++++++++------ .../Systems/Settings/SettingsSystem.cs | 2 + .../UI/Settings/UISettingsController.cs | 3 ++ 8 files changed, 64 insertions(+), 13 deletions(-) create mode 100644 UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset create mode 100644 UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset.meta diff --git a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset index 9549860ae..47f5153d0 100644 --- a/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset +++ b/UOP1_Project/Assets/ProBuilder Data/ProBuilderMeshCache/9a2333a5072248ea8967890cf9726479.asset @@ -6,7 +6,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-81552 + m_Name: 9a2333a5072248ea8967890cf9726479 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 diff --git a/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity b/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity index 0d2ae8a19..6d65be8ee 100644 --- a/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity +++ b/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity @@ -332,6 +332,12 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: -222.5 objectReference: {fileID: 0} + - target: {fileID: 1461259458714161823, guid: cef07ea384e17ef4bb3abfbd08391f33, + type: 3} + propertyPath: _changeCaptioningEventChannel + value: + objectReference: {fileID: 11400000, guid: bff9c33f31ada7642b239acd0515ac8b, + type: 2} - target: {fileID: 1915849195831296150, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMax.y diff --git a/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity b/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity index cd770887e..70783c508 100644 --- a/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity +++ b/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity @@ -482,6 +482,8 @@ MonoBehaviour: _pool: {fileID: 11400000, guid: db3212ef0dc655a439b72b3b1c02b172, type: 2} _initialSize: 10 _SFXEventChannel: {fileID: 11400000, guid: c3c796b7c31ad3647a3fbae42e74764e, type: 2} + _changeCaptioningEventChannel: {fileID: 11400000, guid: bff9c33f31ada7642b239acd0515ac8b, + type: 2} --- !u!4 &888255708 Transform: m_ObjectHideFlags: 0 @@ -820,6 +822,8 @@ MonoBehaviour: type: 2} _changeMusicVolumeEventChannel: {fileID: 11400000, guid: 13e4f5dfe966e1447ba01306e125c0c0, type: 2} + _changeCaptioningEventChannel: {fileID: 11400000, guid: bff9c33f31ada7642b239acd0515ac8b, + type: 2} --- !u!1 &1492261400 GameObject: m_ObjectHideFlags: 0 diff --git a/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset b/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset new file mode 100644 index 000000000..fdab565bc --- /dev/null +++ b/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset @@ -0,0 +1,14 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +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: 3177d113f09ae42448cde1e1a5067d4f, type: 3} + m_Name: ChangeCaptioningIsEnable_Channel + m_EditorClassIdentifier: diff --git a/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset.meta b/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset.meta new file mode 100644 index 000000000..6a5023974 --- /dev/null +++ b/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bff9c33f31ada7642b239acd0515ac8b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs index 6861a6872..948c68cc9 100644 --- a/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs +++ b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs @@ -14,6 +14,10 @@ public class ClosedCaptioningManger : MonoBehaviour [Header("Listening on channels")] [Tooltip("The ClosedCaptioningManger listens to this event, fired by objects in any scene, to display text for the SFXs")] [SerializeField] private AudioCueEventChannelSO _SFXEventChannel = default; + [Tooltip("The ClosedCaptioningManger listens to this event, fired by settings menu or SettingsSystem initializator, to turn on/off captioning")] + [SerializeField] private BoolEventChannelSO _changeCaptioningEventChannel = default; + + private bool _isCaptioningEnabled = default; private void Awake() { @@ -24,31 +28,36 @@ private void Awake() private void OnEnable() { _SFXEventChannel.OnAudioCuePlayRequested += DisplayCaption; + _changeCaptioningEventChannel.OnEventRaised += OnChangeCaptioning; } private void OnDestroy() { _SFXEventChannel.OnAudioCuePlayRequested -= DisplayCaption; + _changeCaptioningEventChannel.OnEventRaised -= OnChangeCaptioning; } public AudioCueKey DisplayCaption(AudioCueSO audioCue, AudioConfigurationSO settings, Vector3 position = default) { - VisualisableAudioClip[] clipsToPlay = audioCue.GetClips(); - CaptionEmitter[] captionEmitterArray = new CaptionEmitter[clipsToPlay.Length]; - - int nOfClips = clipsToPlay.Length; - for (int i = 0; i < nOfClips; i++) + if (_isCaptioningEnabled) { - var currentAudioCaption = clipsToPlay[i].Caption; - if (currentAudioCaption.Visualise && !audioCue.looping) + VisualisableAudioClip[] clipsToPlay = audioCue.GetClips(); + CaptionEmitter[] captionEmitterArray = new CaptionEmitter[clipsToPlay.Length]; + + int nOfClips = clipsToPlay.Length; + for (int i = 0; i < nOfClips; i++) { - captionEmitterArray[i] = _pool.Request(); - if (captionEmitterArray[i] != null) + var currentAudioCaption = clipsToPlay[i].Caption; + if (currentAudioCaption.Visualise && !audioCue.looping) { - captionEmitterArray[i].Display(currentAudioCaption, position); - StartCoroutine(CleanEmitter(captionEmitterArray[i], currentAudioCaption.Duration)); + captionEmitterArray[i] = _pool.Request(); + if (captionEmitterArray[i] != null) + { + captionEmitterArray[i].Display(currentAudioCaption, position); + StartCoroutine(CleanEmitter(captionEmitterArray[i], currentAudioCaption.Duration)); + } } - } + } } return default; @@ -59,5 +68,10 @@ private IEnumerator CleanEmitter(CaptionEmitter captionEmitter, float duration) yield return new WaitForSeconds(duration); _pool.Return(captionEmitter); } + + private void OnChangeCaptioning(bool isCaptioningEnabled) + { + _isCaptioningEnabled = isCaptioningEnabled; + } } } diff --git a/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSystem.cs b/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSystem.cs index 554f7c5c6..84cb66f44 100644 --- a/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSystem.cs +++ b/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSystem.cs @@ -14,6 +14,7 @@ public class SettingsSystem : MonoBehaviour [SerializeField] private FloatEventChannelSO _changeMasterVolumeEventChannel = default; [SerializeField] private FloatEventChannelSO _changeSFXVolumeEventChannel = default; [SerializeField] private FloatEventChannelSO _changeMusicVolumeEventChannel = default; + [SerializeField] private BoolEventChannelSO _changeCaptioningEventChannel = default; private void Awake() { @@ -45,6 +46,7 @@ void SetCurrentSettings() _urpAsset.msaaSampleCount = _currentSettings.AntiAliasingIndex; LocalizationSettings.SelectedLocale = _currentSettings.CurrentLocale; + _changeCaptioningEventChannel.RaiseEvent(_currentSettings.IsCaptioningEnabled); } void SaveSettings() { diff --git a/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs b/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs index 69083e891..01796c24d 100644 --- a/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs +++ b/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs @@ -52,7 +52,9 @@ public class UISettingsController : MonoBehaviour private SettingsType _selectedTab = SettingsType.Audio; [SerializeField] private InputReader _inputReader = default; [SerializeField] private VoidEventChannelSO SaveSettingsEvent = default; + [SerializeField] private BoolEventChannelSO _changeCaptioningEventChannel = default; public UnityAction Closed; + private void OnEnable() { _languageComponent._save += SaveLaguageSettings; @@ -135,6 +137,7 @@ void SwitchTab(float orientation) public void SaveLaguageSettings(Locale local, bool isCaptioningEnabled) { _currentSettings.SaveLanguageSettings(local, isCaptioningEnabled); + _changeCaptioningEventChannel.RaiseEvent(isCaptioningEnabled); SaveSettingsEvent.RaiseEvent(); } public void SaveGraphicsSettings(int newResolutionsIndex, int newAntiAliasingIndex, float newShadowDistance, bool fullscreenState) From c671fd61fb504efddb6c3c8a4626ccd2e028d731 Mon Sep 17 00:00:00 2001 From: codeedward Date: Sat, 4 Sep 2021 20:36:18 +0100 Subject: [PATCH 07/10] Display many AudioClips for same AudioCueSO. --- .../Assets/Scripts/Captioning/ClosedCaptioningManger.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs index 948c68cc9..3316d124e 100644 --- a/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs +++ b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs @@ -17,6 +17,10 @@ public class ClosedCaptioningManger : MonoBehaviour [Tooltip("The ClosedCaptioningManger listens to this event, fired by settings menu or SettingsSystem initializator, to turn on/off captioning")] [SerializeField] private BoolEventChannelSO _changeCaptioningEventChannel = default; + [Header("Captions display settings")] + [Tooltip("Space between captions if many available for same source")] + [SerializeField] private float _spaceBetweenCaptions = 0.5f; + private bool _isCaptioningEnabled = default; private void Awake() @@ -53,6 +57,7 @@ public AudioCueKey DisplayCaption(AudioCueSO audioCue, AudioConfigurationSO sett captionEmitterArray[i] = _pool.Request(); if (captionEmitterArray[i] != null) { + position.y += i* _spaceBetweenCaptions; captionEmitterArray[i].Display(currentAudioCaption, position); StartCoroutine(CleanEmitter(captionEmitterArray[i], currentAudioCaption.Duration)); } From e6339698d322038d9f401d8099ea56efd25f7a81 Mon Sep 17 00:00:00 2001 From: codeedward Date: Sun, 5 Sep 2021 20:09:20 +0100 Subject: [PATCH 08/10] Add off-screen indicator functionality. --- .../Prefabs/Audio/CaptionEmitter.prefab | 193 ++++++++++++++++++ .../Scenes/Managers/PersistentManagers.unity | 4 + .../Audio/AudioCues/SFX/SFX_CookingPot.asset | 24 ++- .../CaptionEmitters/CaptionEmitter.cs | 14 +- .../Captioning/ClosedCaptioningManger.cs | 31 +++ .../Captioning/OffscreenIndicators.meta | 8 + .../OffscreenIndicators/TargetIndicator.cs | 144 +++++++++++++ .../TargetIndicator.cs.meta | 11 + 8 files changed, 425 insertions(+), 4 deletions(-) create mode 100644 UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators.meta create mode 100644 UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators/TargetIndicator.cs create mode 100644 UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators/TargetIndicator.cs.meta diff --git a/UOP1_Project/Assets/Prefabs/Audio/CaptionEmitter.prefab b/UOP1_Project/Assets/Prefabs/Audio/CaptionEmitter.prefab index e07ba219f..c8e4571c2 100644 --- a/UOP1_Project/Assets/Prefabs/Audio/CaptionEmitter.prefab +++ b/UOP1_Project/Assets/Prefabs/Audio/CaptionEmitter.prefab @@ -212,6 +212,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 21582440602513086} + - {fileID: 5265315557293870459} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -227,3 +228,195 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 65d684353f07ccf409beaa53fa24df9e, type: 3} m_Name: m_EditorClassIdentifier: + _offscreeenTargetIndicator: {fileID: 5237466844342545584} +--- !u!1 &8707396123145327967 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5265315557293870459} + - component: {fileID: 8204137920129456817} + - component: {fileID: 5273265359260731308} + - component: {fileID: 7455895294523904584} + m_Layer: 0 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5265315557293870459 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8707396123145327967} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 3288733597995697710} + m_Father: {fileID: 6235676119615081003} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!223 &8204137920129456817 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8707396123145327967} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &5273265359260731308 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8707396123145327967} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!114 &7455895294523904584 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8707396123145327967} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!1 &9136888497102040528 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3288733597995697710} + - component: {fileID: 5237466844342545584} + - component: {fileID: 6378180508691147549} + - component: {fileID: 2280033913382205295} + m_Layer: 0 + m_Name: OffscreenTargetIndicator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3288733597995697710 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9136888497102040528} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: -1, z: 1} + m_Children: [] + m_Father: {fileID: 5265315557293870459} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -118.5, y: -118.5} + m_SizeDelta: {x: 40, y: 40} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &5237466844342545584 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9136888497102040528} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35e7e3b8b04c8ab4287d38ef551625bd, type: 3} + m_Name: + m_EditorClassIdentifier: + OffScreenTargetIndicator: {fileID: 2280033913382205295} + OutOfSightOffset: 30 + canvas: {fileID: 8204137920129456817} +--- !u!222 &6378180508691147549 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9136888497102040528} + m_CullTransparentMesh: 1 +--- !u!114 &2280033913382205295 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9136888497102040528} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 diff --git a/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity b/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity index 70783c508..6a3f24531 100644 --- a/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity +++ b/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity @@ -484,6 +484,10 @@ MonoBehaviour: _SFXEventChannel: {fileID: 11400000, guid: c3c796b7c31ad3647a3fbae42e74764e, type: 2} _changeCaptioningEventChannel: {fileID: 11400000, guid: bff9c33f31ada7642b239acd0515ac8b, type: 2} + _spaceBetweenCaptions: 0.5 + canvas: {fileID: 1387982342} + targetIndicators: [] + MainCamera: {fileID: 0} --- !u!4 &888255708 Transform: m_ObjectHideFlags: 0 diff --git a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_CookingPot.asset b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_CookingPot.asset index 4ca5f4168..fadf9ad73 100644 --- a/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_CookingPot.asset +++ b/UOP1_Project/Assets/ScriptableObjects/Audio/AudioCues/SFX/SFX_CookingPot.asset @@ -17,10 +17,28 @@ MonoBehaviour: - sequenceMode: 2 audioClips: - {fileID: 8300000, guid: f49cdea4e85b04641945385e5107c1c1, type: 3} - Onomatopoeia: - Visualise: 1 + Caption: + Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 100 - sequenceMode: 2 audioClips: - {fileID: 8300000, guid: 5c99c2bc939d4aa4da68a9f750985e31, type: 3} - Onomatopoeia: + Caption: Visualise: 0 + SoundText: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 1 + Duration: 100 diff --git a/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitter.cs b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitter.cs index 7abc2525c..64a624490 100644 --- a/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitter.cs +++ b/UOP1_Project/Assets/Scripts/Captioning/CaptionEmitters/CaptionEmitter.cs @@ -1,10 +1,12 @@ -using TMPro; +using Assets.Scripts.Captioning.OffscreenIndicators; +using TMPro; using UnityEngine; namespace Assets.Scripts.Captioning.CaptionEmitters { public class CaptionEmitter : MonoBehaviour { + [SerializeField] private TargetIndicator _offscreeenTargetIndicator; public void Display(Caption caption, Vector3 position = default) { transform.position = position; @@ -15,5 +17,15 @@ public void Display(Caption caption, Vector3 position = default) captionTextComponent.text = caption.SoundText.GetLocalizedString(); } } + + public void ActivateOffscreenIndicator(bool active) + { + _offscreeenTargetIndicator.gameObject.SetActive(active); + } + + public TargetIndicator GetOffscreentTargetIndicator() + { + return _offscreeenTargetIndicator; + } } } diff --git a/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs index 3316d124e..769ab8e6d 100644 --- a/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs +++ b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs @@ -1,5 +1,6 @@ using Assets.Scripts.Captioning.CaptionEmitters; using System.Collections; +using System.Collections.Generic; using UnityEngine; namespace Assets.Scripts.Audio @@ -22,11 +23,15 @@ public class ClosedCaptioningManger : MonoBehaviour [SerializeField] private float _spaceBetweenCaptions = 0.5f; private bool _isCaptioningEnabled = default; + private List captionEmmiters = new List(); + private UnityEngine.Camera MainCamera; private void Awake() { _pool.Prewarm(_initialSize); _pool.SetParent(this.transform); + + MainCamera = GameObject.Find("Main Camera").GetComponent(); } private void OnEnable() @@ -41,6 +46,17 @@ private void OnDestroy() _changeCaptioningEventChannel.OnEventRaised -= OnChangeCaptioning; } + private void Update() + { + if (_isCaptioningEnabled && captionEmmiters.Count > 0) + { + for (int i = 0; i < captionEmmiters.Count; i++) + { + captionEmmiters[i].GetOffscreentTargetIndicator().UpdateTargetIndicator(); + } + } + } + public AudioCueKey DisplayCaption(AudioCueSO audioCue, AudioConfigurationSO settings, Vector3 position = default) { if (_isCaptioningEnabled) @@ -59,6 +75,8 @@ public AudioCueKey DisplayCaption(AudioCueSO audioCue, AudioConfigurationSO sett { position.y += i* _spaceBetweenCaptions; captionEmitterArray[i].Display(currentAudioCaption, position); + AddCaptionToOffscreenIndicatorWatchList(captionEmitterArray[i]); + StartCoroutine(CleanEmitter(captionEmitterArray[i], currentAudioCaption.Duration)); } } @@ -71,6 +89,8 @@ public AudioCueKey DisplayCaption(AudioCueSO audioCue, AudioConfigurationSO sett private IEnumerator CleanEmitter(CaptionEmitter captionEmitter, float duration) { yield return new WaitForSeconds(duration); + + RemoveCaptionFromOffscreenIndicatorWatchList(captionEmitter); _pool.Return(captionEmitter); } @@ -78,5 +98,16 @@ private void OnChangeCaptioning(bool isCaptioningEnabled) { _isCaptioningEnabled = isCaptioningEnabled; } + + private void AddCaptionToOffscreenIndicatorWatchList(CaptionEmitter target) + { + target.GetOffscreentTargetIndicator().InitialiseTargetIndicator(target.gameObject, MainCamera); + captionEmmiters.Add(target); + } + + private void RemoveCaptionFromOffscreenIndicatorWatchList(CaptionEmitter target) + { + captionEmmiters.Remove(target); + } } } diff --git a/UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators.meta b/UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators.meta new file mode 100644 index 000000000..e8800fecb --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1325842dedb27e047a7de0e8ab0b3ca0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators/TargetIndicator.cs b/UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators/TargetIndicator.cs new file mode 100644 index 000000000..f2fda15f6 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators/TargetIndicator.cs @@ -0,0 +1,144 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace Assets.Scripts.Captioning.OffscreenIndicators +{ + + public class TargetIndicator : MonoBehaviour + { + public Image OffScreenTargetIndicator; + public float OutOfSightOffset = 20f; + [SerializeField] private Canvas canvas; + + private float outOfSightOffest { get { return OutOfSightOffset /* canvasRect.localScale.x*/; } } + + private GameObject target; + private UnityEngine.Camera mainCamera; + private RectTransform canvasRect; + + private RectTransform rectTransform; + + private void Awake() + { + rectTransform = GetComponent(); + } + + public void InitialiseTargetIndicator(GameObject target, UnityEngine.Camera mainCamera) + { + this.target = target; + this.mainCamera = mainCamera; + canvasRect = canvas.GetComponent(); + } + + public void UpdateTargetIndicator() + { + SetIndicatorPosition(); + } + + protected void SetIndicatorPosition() + { + //Get the position of the target in relation to the screenSpace + Vector3 indicatorPosition = mainCamera.WorldToScreenPoint(target.transform.position); + + //In case the target is both in front of the camera and within the bounds of its frustrum + if (indicatorPosition.z >= 0f & indicatorPosition.x <= canvasRect.rect.width * canvasRect.localScale.x + & indicatorPosition.y <= canvasRect.rect.height * canvasRect.localScale.x & indicatorPosition.x >= 0f & indicatorPosition.y >= 0f) + { + //Set z to zero since it's not needed and only causes issues (too far away from Camera to be shown!) + indicatorPosition.z = 0f; + + //Target is in sight, change indicator parts around accordingly + targetOutOfSight(false, indicatorPosition); + } + + //In case the target is in front of the ship, but out of sight + else if (indicatorPosition.z >= 0f) + { + //Set indicatorposition and set targetIndicator to outOfSight form. + indicatorPosition = OutOfRangeindicatorPositionB(indicatorPosition); + targetOutOfSight(true, indicatorPosition); + } + else + { + //Invert indicatorPosition! Otherwise the indicator's positioning will invert if the target is on the backside of the camera! + indicatorPosition *= -1f; + + //Set indicatorposition and set targetIndicator to outOfSight form. + indicatorPosition = OutOfRangeindicatorPositionB(indicatorPosition); + targetOutOfSight(true, indicatorPosition); + } + + //Set the position of the indicator + rectTransform.position = indicatorPosition; + } + + private Vector3 OutOfRangeindicatorPositionB(Vector3 indicatorPosition) + { + //Set indicatorPosition.z to 0f; We don't need that and it'll actually cause issues if it's outside the camera range (which easily happens in my case) + indicatorPosition.z = 0f; + + //Calculate Center of Canvas and subtract from the indicator position to have indicatorCoordinates from the Canvas Center instead the bottom left! + Vector3 canvasCenter = new Vector3(canvasRect.rect.width / 2f, canvasRect.rect.height / 2f, 0f) * canvasRect.localScale.x; + indicatorPosition -= canvasCenter; + + //Calculate if Vector to target intersects (first) with y border of canvas rect or if Vector intersects (first) with x border: + //This is required to see which border needs to be set to the max value and at which border the indicator needs to be moved (up & down or left & right) + float divX = (canvasRect.rect.width / 2f - outOfSightOffest) / Mathf.Abs(indicatorPosition.x); + float divY = (canvasRect.rect.height / 2f - outOfSightOffest) / Mathf.Abs(indicatorPosition.y); + + //In case it intersects with x border first, put the x-one to the border and adjust the y-one accordingly (Trigonometry) + if (divX < divY) + { + float angle = Vector3.SignedAngle(Vector3.right, indicatorPosition, Vector3.forward); + indicatorPosition.x = Mathf.Sign(indicatorPosition.x) * (canvasRect.rect.width * 0.5f - outOfSightOffest) * canvasRect.localScale.x; + indicatorPosition.y = Mathf.Tan(Mathf.Deg2Rad * angle) * indicatorPosition.x; + } + + //In case it intersects with y border first, put the y-one to the border and adjust the x-one accordingly (Trigonometry) + else + { + float angle = Vector3.SignedAngle(Vector3.up, indicatorPosition, Vector3.forward); + + indicatorPosition.y = Mathf.Sign(indicatorPosition.y) * (canvasRect.rect.height / 2f - outOfSightOffest) * canvasRect.localScale.y; + indicatorPosition.x = -Mathf.Tan(Mathf.Deg2Rad * angle) * indicatorPosition.y; + } + + //Change the indicator Position back to the actual rectTransform coordinate system and return indicatorPosition + indicatorPosition += canvasCenter; + return indicatorPosition; + } + + private void targetOutOfSight(bool oos, Vector3 indicatorPosition) + { + //In Case the indicator is OutOfSight + if (oos) + { + //Activate and Deactivate some stuff + if (OffScreenTargetIndicator.gameObject.activeSelf == false) + OffScreenTargetIndicator.gameObject.SetActive(true); + + //Set the rotation of the OutOfSight direction indicator + OffScreenTargetIndicator.rectTransform.rotation = Quaternion.Euler(rotationOutOfSightTargetindicator(indicatorPosition)); + } + + //In case that the indicator is InSight, turn on the inSight stuff and turn off the OOS stuff. + else + { + if (OffScreenTargetIndicator.gameObject.activeSelf == true) + OffScreenTargetIndicator.gameObject.SetActive(false); + } + } + + private Vector3 rotationOutOfSightTargetindicator(Vector3 indicatorPosition) + { + //Calculate the canvasCenter + Vector3 canvasCenter = new Vector3(canvasRect.rect.width / 2f, canvasRect.rect.height / 2f, 0f) * canvasRect.localScale.x; + + //Calculate the signedAngle between the position of the indicator and the Direction up. + float angle = Vector3.SignedAngle(Vector3.up, indicatorPosition - canvasCenter, Vector3.forward); + + //return the angle as a rotation Vector + return new Vector3(0f, 0f, angle); + } + } +} diff --git a/UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators/TargetIndicator.cs.meta b/UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators/TargetIndicator.cs.meta new file mode 100644 index 000000000..f1bf88ac8 --- /dev/null +++ b/UOP1_Project/Assets/Scripts/Captioning/OffscreenIndicators/TargetIndicator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 35e7e3b8b04c8ab4287d38ef551625bd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From e6572a53237deb7b4ee7f79b81cba7092e1cbcc7 Mon Sep 17 00:00:00 2001 From: codeedward Date: Sun, 5 Sep 2021 21:48:41 +0100 Subject: [PATCH 09/10] Fix for the language settings. Apply changes to the prefab. --- .../UI/Shared/Settings/Setting_Field.prefab | 2 +- .../UI/Shared/Settings/Settings_Panel.prefab | 221 ++++++++++++++---- .../Assets/Scenes/Managers/Gameplay.unity | 178 -------------- 3 files changed, 182 insertions(+), 219 deletions(-) diff --git a/UOP1_Project/Assets/Prefabs/UI/Shared/Settings/Setting_Field.prefab b/UOP1_Project/Assets/Prefabs/UI/Shared/Settings/Setting_Field.prefab index 3e9835309..b604fdebd 100644 --- a/UOP1_Project/Assets/Prefabs/UI/Shared/Settings/Setting_Field.prefab +++ b/UOP1_Project/Assets/Prefabs/UI/Shared/Settings/Setting_Field.prefab @@ -325,7 +325,7 @@ MonoBehaviour: _colorUnselected: {r: 0.93725497, g: 0.89019614, b: 0.75294125, a: 1} _bgSelected: {fileID: 21300000, guid: 3407fc574197a4a2cbec1c7cd06eee31, type: 3} _bgUnselected: {fileID: 21300000, guid: e02a109c7d3ef456082a6a9968b98f8e, type: 3} - _fieldType: 1 + _fieldType: 9 _buttonNext: {fileID: 1194130716540896082} _buttonPrevious: {fileID: 8646458778101552516} --- !u!114 &2800679463986886097 diff --git a/UOP1_Project/Assets/Prefabs/UI/Shared/Settings/Settings_Panel.prefab b/UOP1_Project/Assets/Prefabs/UI/Shared/Settings/Settings_Panel.prefab index 1bca31451..a36800a65 100644 --- a/UOP1_Project/Assets/Prefabs/UI/Shared/Settings/Settings_Panel.prefab +++ b/UOP1_Project/Assets/Prefabs/UI/Shared/Settings/Settings_Panel.prefab @@ -119,6 +119,8 @@ MonoBehaviour: _settingTabsList: 020000000100000000000000 _inputReader: {fileID: 11400000, guid: 945ec0365077176418488737deed54be, type: 2} SaveSettingsEvent: {fileID: 11400000, guid: e6ff8a48cab21e046a6cdb61bab35111, type: 2} + _changeCaptioningEventChannel: {fileID: 11400000, guid: bff9c33f31ada7642b239acd0515ac8b, + type: 2} --- !u!114 &7086537844064906689 MonoBehaviour: m_ObjectHideFlags: 0 @@ -613,6 +615,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _languageField: {fileID: 8131748445726702138} + _captioningField: {fileID: 3220236996591357505} _saveButton: {fileID: 870952728988565685} _resetButton: {fileID: 1944102497055199272} --- !u!1 &5349573984972141665 @@ -722,6 +725,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 4881546387008789613} + - {fileID: 2294565109411473430} m_Father: {fileID: 8370108995068681879} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -2132,36 +2136,36 @@ PrefabInstance: objectReference: {fileID: 6399644085110733686} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: bfbbc6fd7e74c4e288fdadc2265eef46, type: 3} ---- !u!114 &8652063619755096489 stripped +--- !u!114 &899100877938527913 stripped MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + m_CorrespondingSourceObject: {fileID: 2800679463986886097, guid: bfbbc6fd7e74c4e288fdadc2265eef46, type: 3} m_PrefabInstance: {fileID: 3072647221715401592} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 02a6bc9a95af04bb2824645c3268e511, type: 3} + m_Script: {fileID: 11500000, guid: 77b26c7a54d143a7b78bcba222262814, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!224 &5437310083346915326 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - m_PrefabInstance: {fileID: 3072647221715401592} - m_PrefabAsset: {fileID: 0} ---- !u!114 &899100877938527913 stripped +--- !u!114 &8652063619755096489 stripped MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2800679463986886097, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + m_CorrespondingSourceObject: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46, type: 3} m_PrefabInstance: {fileID: 3072647221715401592} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 77b26c7a54d143a7b78bcba222262814, type: 3} + m_Script: {fileID: 11500000, guid: 02a6bc9a95af04bb2824645c3268e511, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!224 &5437310083346915326 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + m_PrefabInstance: {fileID: 3072647221715401592} + m_PrefabAsset: {fileID: 0} --- !u!1001 &3190829169493670524 PrefabInstance: m_ObjectHideFlags: 0 @@ -2638,9 +2642,15 @@ PrefabInstance: objectReference: {fileID: 6399644085110733686} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 21bf92a4b9386f2478adede01a87825c, type: 3} ---- !u!114 &3310278286793198363 stripped +--- !u!224 &8458125608585290032 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 5107333375139220170, guid: 21bf92a4b9386f2478adede01a87825c, + type: 3} + m_PrefabInstance: {fileID: 3711433147493641210} + m_PrefabAsset: {fileID: 0} +--- !u!114 &4259438363978161030 stripped MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2193763572902306017, guid: 21bf92a4b9386f2478adede01a87825c, + m_CorrespondingSourceObject: {fileID: 620714271979942012, guid: 21bf92a4b9386f2478adede01a87825c, type: 3} m_PrefabInstance: {fileID: 3711433147493641210} m_PrefabAsset: {fileID: 0} @@ -2650,9 +2660,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4100492e3231549df8aa06bff38e1ce9, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &4259438363978161030 stripped +--- !u!114 &3310278286793198363 stripped MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 620714271979942012, guid: 21bf92a4b9386f2478adede01a87825c, + m_CorrespondingSourceObject: {fileID: 2193763572902306017, guid: 21bf92a4b9386f2478adede01a87825c, type: 3} m_PrefabInstance: {fileID: 3711433147493641210} m_PrefabAsset: {fileID: 0} @@ -2662,12 +2672,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4100492e3231549df8aa06bff38e1ce9, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!224 &8458125608585290032 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 5107333375139220170, guid: 21bf92a4b9386f2478adede01a87825c, - type: 3} - m_PrefabInstance: {fileID: 3711433147493641210} - m_PrefabAsset: {fileID: 0} --- !u!1001 &3914059067380394503 PrefabInstance: m_ObjectHideFlags: 0 @@ -3475,12 +3479,6 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: bfbbc6fd7e74c4e288fdadc2265eef46, type: 3} ---- !u!224 &1309691623010409044 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - m_PrefabInstance: {fileID: 8358115208512814802} - m_PrefabAsset: {fileID: 0} --- !u!114 &2399168612977409027 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46, @@ -3493,6 +3491,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 02a6bc9a95af04bb2824645c3268e511, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!224 &1309691623010409044 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + m_PrefabInstance: {fileID: 8358115208512814802} + m_PrefabAsset: {fileID: 0} --- !u!1001 &8698515608582860009 PrefabInstance: m_ObjectHideFlags: 0 @@ -3650,6 +3654,143 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 8698515608582860009} m_PrefabAsset: {fileID: 0} +--- !u!1001 &9081198755924724880 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4419775157188859448} + m_Modifications: + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_SizeDelta.x + value: 1248 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_SizeDelta.y + value: 73 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 624 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -129.5 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7048424685039854745, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + propertyPath: m_Name + value: Setting_Item_Captioning + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: bfbbc6fd7e74c4e288fdadc2265eef46, type: 3} +--- !u!114 &3220236996591357505 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + m_PrefabInstance: {fileID: 9081198755924724880} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 02a6bc9a95af04bb2824645c3268e511, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &2294565109411473430 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + m_PrefabInstance: {fileID: 9081198755924724880} + m_PrefabAsset: {fileID: 0} --- !u!1001 &9083225266378968743 PrefabInstance: m_ObjectHideFlags: 0 @@ -3796,6 +3937,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 77b26c7a54d143a7b78bcba222262814, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!224 &2296573752810023457 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + m_PrefabInstance: {fileID: 9083225266378968743} + m_PrefabAsset: {fileID: 0} --- !u!114 &3222443296666537078 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46, @@ -3808,12 +3955,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 02a6bc9a95af04bb2824645c3268e511, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!224 &2296573752810023457 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - m_PrefabInstance: {fileID: 9083225266378968743} - m_PrefabAsset: {fileID: 0} --- !u!1001 &9107016848623095008 PrefabInstance: m_ObjectHideFlags: 0 @@ -3948,12 +4089,6 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: bfbbc6fd7e74c4e288fdadc2265eef46, type: 3} ---- !u!224 &2284335988535224422 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - m_PrefabInstance: {fileID: 9107016848623095008} - m_PrefabAsset: {fileID: 0} --- !u!114 &3230468282395364913 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46, @@ -3966,3 +4101,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 02a6bc9a95af04bb2824645c3268e511, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!224 &2284335988535224422 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, + type: 3} + m_PrefabInstance: {fileID: 9107016848623095008} + m_PrefabAsset: {fileID: 0} diff --git a/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity b/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity index 6d65be8ee..301427260 100644 --- a/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity +++ b/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity @@ -332,12 +332,6 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: -222.5 objectReference: {fileID: 0} - - target: {fileID: 1461259458714161823, guid: cef07ea384e17ef4bb3abfbd08391f33, - type: 3} - propertyPath: _changeCaptioningEventChannel - value: - objectReference: {fileID: 11400000, guid: bff9c33f31ada7642b239acd0515ac8b, - type: 2} - target: {fileID: 1915849195831296150, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMax.y @@ -363,11 +357,6 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: -50 objectReference: {fileID: 0} - - target: {fileID: 2210817385620037417, guid: cef07ea384e17ef4bb3abfbd08391f33, - type: 3} - propertyPath: _captioningField - value: - objectReference: {fileID: 1222135179} - target: {fileID: 2284335988535224422, guid: cef07ea384e17ef4bb3abfbd08391f33, type: 3} propertyPath: m_AnchorMax.y @@ -863,12 +852,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: eaa1d1bcaa3ee4cf0af311e19f20e9ed, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!224 &978261887 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 4419775157188859448, guid: cef07ea384e17ef4bb3abfbd08391f33, - type: 3} - m_PrefabInstance: {fileID: 978261884} - m_PrefabAsset: {fileID: 0} --- !u!224 &1172743537 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 9125883718042355530, guid: 42ed5ae1f90714c4488cfabda2298591, @@ -887,167 +870,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 24b948a9bd4284c4ab2089bf06c7f20c, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1001 &1222135178 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 978261887} - m_Modifications: - - target: {fileID: 1194130716540896082, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_Navigation.m_SelectOnDown - value: - objectReference: {fileID: 0} - - target: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: _fieldType - value: 9 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_AnchorMax.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_AnchorMin.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_SizeDelta.x - value: 1248 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_SizeDelta.y - value: 73 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalScale.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalScale.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalScale.z - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 624 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_AnchoredPosition.y - value: -129.5 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7048424685039854745, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_Name - value: Setting_Item_Captioning - objectReference: {fileID: 0} - - target: {fileID: 8646458778101552516, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - propertyPath: m_Navigation.m_SelectOnDown - value: - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: bfbbc6fd7e74c4e288fdadc2265eef46, type: 3} ---- !u!114 &1222135179 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46, - type: 3} - m_PrefabInstance: {fileID: 1222135178} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 02a6bc9a95af04bb2824645c3268e511, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1001 &1479900141 PrefabInstance: m_ObjectHideFlags: 0 From e3a48b54431accf36315d11f68783df56bcc9872 Mon Sep 17 00:00:00 2001 From: codeedward Date: Mon, 6 Sep 2021 21:18:32 +0100 Subject: [PATCH 10/10] Move captioning manager from persistent managers to the gameplay scene. Remove an event channel for the captioning setting change. Instead reference SettingsSO. --- .../Gameplay/CloseCaptioningManager.prefab | 53 ++++++++++++++ .../CloseCaptioningManager.prefab.meta} | 5 +- .../Assets/Scenes/Managers/Gameplay.unity | 71 ++++++++++++++++++- .../Scenes/Managers/PersistentManagers.unity | 61 ++-------------- .../ChangeCaptioningIsEnable_Channel.asset | 14 ---- .../Captioning/ClosedCaptioningManger.cs | 18 +++-- .../Systems/Settings/SettingsSystem.cs | 2 - .../UI/Settings/UISettingsController.cs | 2 - 8 files changed, 137 insertions(+), 89 deletions(-) create mode 100644 UOP1_Project/Assets/Prefabs/Gameplay/CloseCaptioningManager.prefab rename UOP1_Project/Assets/{ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset.meta => Prefabs/Gameplay/CloseCaptioningManager.prefab.meta} (52%) delete mode 100644 UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset diff --git a/UOP1_Project/Assets/Prefabs/Gameplay/CloseCaptioningManager.prefab b/UOP1_Project/Assets/Prefabs/Gameplay/CloseCaptioningManager.prefab new file mode 100644 index 000000000..8f8bcfd46 --- /dev/null +++ b/UOP1_Project/Assets/Prefabs/Gameplay/CloseCaptioningManager.prefab @@ -0,0 +1,53 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &8060799749729364716 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8060799749729364714} + - component: {fileID: 8060799749729364717} + m_Layer: 0 + m_Name: CloseCaptioningManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8060799749729364714 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8060799749729364716} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8060799749729364717 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8060799749729364716} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8c31ba6886f25db4ebf5bd2ab7c14e24, type: 3} + m_Name: + m_EditorClassIdentifier: + _factory: {fileID: 11400000, guid: b8afea2e327afa449a279042da9505b7, type: 2} + _pool: {fileID: 11400000, guid: db3212ef0dc655a439b72b3b1c02b172, type: 2} + _initialSize: 10 + _SFXEventChannel: {fileID: 11400000, guid: c3c796b7c31ad3647a3fbae42e74764e, type: 2} + _changeCaptioningEventChannel: {fileID: 11400000, guid: bff9c33f31ada7642b239acd0515ac8b, + type: 2} + _currentSettings: {fileID: 11400000, guid: 10a9cfb7ceadb294da93b9773e89074b, type: 2} + _spaceBetweenCaptions: 0.5 diff --git a/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset.meta b/UOP1_Project/Assets/Prefabs/Gameplay/CloseCaptioningManager.prefab.meta similarity index 52% rename from UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset.meta rename to UOP1_Project/Assets/Prefabs/Gameplay/CloseCaptioningManager.prefab.meta index 6a5023974..95460e627 100644 --- a/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset.meta +++ b/UOP1_Project/Assets/Prefabs/Gameplay/CloseCaptioningManager.prefab.meta @@ -1,8 +1,7 @@ fileFormatVersion: 2 -guid: bff9c33f31ada7642b239acd0515ac8b -NativeFormatImporter: +guid: f7b4bd569801e7b4d87242a462e1ab7f +PrefabImporter: externalObjects: {} - mainObjectFileID: 11400000 userData: assetBundleName: assetBundleVariant: diff --git a/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity b/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity index 301427260..7a45f6c1c 100644 --- a/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity +++ b/UOP1_Project/Assets/Scenes/Managers/Gameplay.unity @@ -123,6 +123,75 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1001 &278852094 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364714, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8060799749729364716, guid: f7b4bd569801e7b4d87242a462e1ab7f, + type: 3} + propertyPath: m_Name + value: CloseCaptioningManager + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f7b4bd569801e7b4d87242a462e1ab7f, type: 3} --- !u!114 &670213351 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 8980297398607076176, guid: ccad748453924ff4092fe3e5b978d8e5, @@ -1176,7 +1245,7 @@ RectTransform: - {fileID: 4949818870599756131} - {fileID: 1479900142} m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} diff --git a/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity b/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity index 6a3f24531..4b4f0d500 100644 --- a/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity +++ b/UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity @@ -301,7 +301,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &819074216 PrefabInstance: @@ -313,7 +313,7 @@ PrefabInstance: - target: {fileID: 4398103872695503857, guid: f3351fde0c1164c1da695b12e67d8675, type: 3} propertyPath: m_RootOrder - value: 7 + value: 6 objectReference: {fileID: 0} - target: {fileID: 4398103872695503857, guid: f3351fde0c1164c1da695b12e67d8675, type: 3} @@ -449,59 +449,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 841012433} m_CullTransparentMesh: 0 ---- !u!1 &888255706 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 888255708} - - component: {fileID: 888255707} - m_Layer: 0 - m_Name: CloseCaptioningManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &888255707 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 888255706} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8c31ba6886f25db4ebf5bd2ab7c14e24, type: 3} - m_Name: - m_EditorClassIdentifier: - _factory: {fileID: 11400000, guid: b8afea2e327afa449a279042da9505b7, type: 2} - _pool: {fileID: 11400000, guid: db3212ef0dc655a439b72b3b1c02b172, type: 2} - _initialSize: 10 - _SFXEventChannel: {fileID: 11400000, guid: c3c796b7c31ad3647a3fbae42e74764e, type: 2} - _changeCaptioningEventChannel: {fileID: 11400000, guid: bff9c33f31ada7642b239acd0515ac8b, - type: 2} - _spaceBetweenCaptions: 0.5 - canvas: {fileID: 1387982342} - targetIndicators: [] - MainCamera: {fileID: 0} ---- !u!4 &888255708 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 888255706} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1122701836 GameObject: m_ObjectHideFlags: 0 @@ -545,7 +492,7 @@ Transform: m_LocalScale: {x: 0.85714287, y: 0.85714287, z: 0.85714287} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1260877634 GameObject: @@ -802,7 +749,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1424775818 MonoBehaviour: diff --git a/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset b/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset deleted file mode 100644 index fdab565bc..000000000 --- a/UOP1_Project/Assets/ScriptableObjects/EventChannels/ChangeCaptioningIsEnable_Channel.asset +++ /dev/null @@ -1,14 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -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: 3177d113f09ae42448cde1e1a5067d4f, type: 3} - m_Name: ChangeCaptioningIsEnable_Channel - m_EditorClassIdentifier: diff --git a/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs index 769ab8e6d..453b57ed3 100644 --- a/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs +++ b/UOP1_Project/Assets/Scripts/Captioning/ClosedCaptioningManger.cs @@ -19,10 +19,12 @@ public class ClosedCaptioningManger : MonoBehaviour [SerializeField] private BoolEventChannelSO _changeCaptioningEventChannel = default; [Header("Captions display settings")] + [Tooltip("Settings object")] + [SerializeField] private SettingsSO _currentSettings = default; [Tooltip("Space between captions if many available for same source")] [SerializeField] private float _spaceBetweenCaptions = 0.5f; - private bool _isCaptioningEnabled = default; + private bool _isCaptioningEnabled => _currentSettings.IsCaptioningEnabled; private List captionEmmiters = new List(); private UnityEngine.Camera MainCamera; @@ -30,20 +32,16 @@ private void Awake() { _pool.Prewarm(_initialSize); _pool.SetParent(this.transform); - - MainCamera = GameObject.Find("Main Camera").GetComponent(); } private void OnEnable() { _SFXEventChannel.OnAudioCuePlayRequested += DisplayCaption; - _changeCaptioningEventChannel.OnEventRaised += OnChangeCaptioning; } private void OnDestroy() { _SFXEventChannel.OnAudioCuePlayRequested -= DisplayCaption; - _changeCaptioningEventChannel.OnEventRaised -= OnChangeCaptioning; } private void Update() @@ -94,13 +92,13 @@ private IEnumerator CleanEmitter(CaptionEmitter captionEmitter, float duration) _pool.Return(captionEmitter); } - private void OnChangeCaptioning(bool isCaptioningEnabled) - { - _isCaptioningEnabled = isCaptioningEnabled; - } - private void AddCaptionToOffscreenIndicatorWatchList(CaptionEmitter target) { + if (MainCamera == null) + { + MainCamera = GameObject.Find("Main Camera").GetComponent(); + } + target.GetOffscreentTargetIndicator().InitialiseTargetIndicator(target.gameObject, MainCamera); captionEmmiters.Add(target); } diff --git a/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSystem.cs b/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSystem.cs index 84cb66f44..554f7c5c6 100644 --- a/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSystem.cs +++ b/UOP1_Project/Assets/Scripts/Systems/Settings/SettingsSystem.cs @@ -14,7 +14,6 @@ public class SettingsSystem : MonoBehaviour [SerializeField] private FloatEventChannelSO _changeMasterVolumeEventChannel = default; [SerializeField] private FloatEventChannelSO _changeSFXVolumeEventChannel = default; [SerializeField] private FloatEventChannelSO _changeMusicVolumeEventChannel = default; - [SerializeField] private BoolEventChannelSO _changeCaptioningEventChannel = default; private void Awake() { @@ -46,7 +45,6 @@ void SetCurrentSettings() _urpAsset.msaaSampleCount = _currentSettings.AntiAliasingIndex; LocalizationSettings.SelectedLocale = _currentSettings.CurrentLocale; - _changeCaptioningEventChannel.RaiseEvent(_currentSettings.IsCaptioningEnabled); } void SaveSettings() { diff --git a/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs b/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs index 01796c24d..f90705b91 100644 --- a/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs +++ b/UOP1_Project/Assets/Scripts/UI/Settings/UISettingsController.cs @@ -52,7 +52,6 @@ public class UISettingsController : MonoBehaviour private SettingsType _selectedTab = SettingsType.Audio; [SerializeField] private InputReader _inputReader = default; [SerializeField] private VoidEventChannelSO SaveSettingsEvent = default; - [SerializeField] private BoolEventChannelSO _changeCaptioningEventChannel = default; public UnityAction Closed; private void OnEnable() @@ -137,7 +136,6 @@ void SwitchTab(float orientation) public void SaveLaguageSettings(Locale local, bool isCaptioningEnabled) { _currentSettings.SaveLanguageSettings(local, isCaptioningEnabled); - _changeCaptioningEventChannel.RaiseEvent(isCaptioningEnabled); SaveSettingsEvent.RaiseEvent(); } public void SaveGraphicsSettings(int newResolutionsIndex, int newAntiAliasingIndex, float newShadowDistance, bool fullscreenState)