voiceover vca and volume slider added to Unity and FMOD
This commit is contained in:
@@ -2551,7 +2551,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ebe1ab889a9bed940995d4f47bc743ef, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
target: 2
|
||||
target: 5
|
||||
--- !u!1 &3847096334227967442
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3539,8 +3539,8 @@ RectTransform:
|
||||
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: -2000.1, y: 34.7}
|
||||
m_SizeDelta: {x: 117.7, y: 49.6}
|
||||
m_AnchoredPosition: {x: -2404.8, y: 34.7}
|
||||
m_SizeDelta: {x: 220, y: 49.6}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2306375091028476275
|
||||
CanvasRenderer:
|
||||
@@ -3570,7 +3570,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 'Music:'
|
||||
m_text: 'Voiceovers:'
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: d564a6b9a8a781b438125b614edcc297, type: 2}
|
||||
m_sharedMaterial: {fileID: 2467261418627247352, guid: d564a6b9a8a781b438125b614edcc297,
|
||||
@@ -4890,7 +4890,7 @@ GameObject:
|
||||
- component: {fileID: 9123126080211807181}
|
||||
- component: {fileID: 2844805864736818914}
|
||||
m_Layer: 5
|
||||
m_Name: Music Slider
|
||||
m_Name: Voiceover Slider
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
||||
@@ -8,7 +8,8 @@ public class SliderToVCA : MonoBehaviour
|
||||
Ambiences,
|
||||
Music,
|
||||
SFX,
|
||||
UI
|
||||
UI,
|
||||
Voiceovers
|
||||
}
|
||||
|
||||
public VCATarget target;
|
||||
@@ -40,6 +41,8 @@ private float GetInitialValueFromAudioManager()
|
||||
return AudioManager.Instance.SFXVolume;
|
||||
case VCATarget.UI:
|
||||
return AudioManager.Instance.UIVolume;
|
||||
case VCATarget.Voiceovers:
|
||||
return AudioManager.Instance.VoiceoverVolume;
|
||||
default:
|
||||
return 0.5f;
|
||||
}
|
||||
@@ -76,6 +79,10 @@ private float GetInitialValueFromAudioManager()
|
||||
case VCATarget.UI:
|
||||
AudioManager.Instance.SetUIVCA(value);
|
||||
break;
|
||||
|
||||
case VCATarget.Voiceovers:
|
||||
AudioManager.Instance.SetVoiceoverVCA(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -20,6 +20,7 @@ public class AudioManager : MonoBehaviour
|
||||
private VCA sfxVCA;
|
||||
private VCA uiVCA;
|
||||
private VCA ambienceVCA;
|
||||
private VCA voiceoverVCA;
|
||||
|
||||
[SerializeField]
|
||||
[Header("Volume")]
|
||||
@@ -40,6 +41,9 @@ public class AudioManager : MonoBehaviour
|
||||
public float UIVolume = 0.5f;
|
||||
[Range(0, 1)]
|
||||
|
||||
public float VoiceoverVolume = 0.5f;
|
||||
[Range(0, 1)]
|
||||
|
||||
private Bus masterBus;
|
||||
private Bus ambientBus;
|
||||
private Bus musicBus;
|
||||
@@ -109,18 +113,19 @@ public class AudioManager : MonoBehaviour
|
||||
_instance.sfxBus = RuntimeManager.GetBus("bus:/SFX");
|
||||
_instance.uiBus = RuntimeManager.GetBus("bus:/UI");
|
||||
|
||||
|
||||
_instance.masterVCA = RuntimeManager.GetVCA("vca:/Master");
|
||||
_instance.musicVCA = RuntimeManager.GetVCA("vca:/Music");
|
||||
_instance.ambienceVCA = RuntimeManager.GetVCA("vca:/Ambiences");
|
||||
_instance.sfxVCA = RuntimeManager.GetVCA("vca:/SFX");
|
||||
_instance.uiVCA = RuntimeManager.GetVCA("vca:/UI");
|
||||
_instance.voiceoverVCA = RuntimeManager.GetVCA("vca:/Voiceovers");
|
||||
|
||||
_instance.masterVCA.setVolume(_instance.MasterVolume);
|
||||
_instance.musicVCA.setVolume(_instance.MusicVolume);
|
||||
_instance.ambienceVCA.setVolume(_instance.AmbienceVolume);
|
||||
_instance.sfxVCA.setVolume(_instance.SFXVolume);
|
||||
_instance.uiVCA.setVolume(_instance.UIVolume);
|
||||
_instance.voiceoverVCA.setVolume(_instance.VoiceoverVolume);
|
||||
|
||||
_instance.dialogueCallback = new EVENT_CALLBACK(DialogueEventCallback);
|
||||
|
||||
@@ -156,6 +161,11 @@ public class AudioManager : MonoBehaviour
|
||||
UIVolume = value;
|
||||
uiVCA.setVolume(UIVolume);
|
||||
}
|
||||
public void SetVoiceoverVCA(float value)
|
||||
{
|
||||
VoiceoverVolume = value;
|
||||
voiceoverVCA.setVolume(VoiceoverVolume);
|
||||
}
|
||||
|
||||
|
||||
private void Awake()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -56,7 +56,7 @@
|
||||
<destination>{f7b8336c-a7e9-4d4f-8950-e57f30a5971f}</destination>
|
||||
</relationship>
|
||||
<relationship name="output">
|
||||
<destination>{c751273e-6b77-46b1-8c19-a99f6f08e61e}</destination>
|
||||
<destination>{69ee688f-dc4e-4df2-a125-df79ed93217e}</destination>
|
||||
</relationship>
|
||||
</object>
|
||||
<object class="EventAutomatableProperties" id="{4a54032f-00d8-4530-9d5c-2590aa311c66}" />
|
||||
@@ -173,7 +173,6 @@
|
||||
<property name="name">
|
||||
<value>SourcePos</value>
|
||||
</property>
|
||||
<property name="value" />
|
||||
<property name="dataType">
|
||||
<value>-2</value>
|
||||
</property>
|
||||
@@ -182,7 +181,6 @@
|
||||
<property name="name">
|
||||
<value>OverallGain</value>
|
||||
</property>
|
||||
<property name="value" />
|
||||
<property name="dataType">
|
||||
<value>-1</value>
|
||||
</property>
|
||||
@@ -511,7 +509,6 @@
|
||||
<property name="name">
|
||||
<value>SimOutputs</value>
|
||||
</property>
|
||||
<property name="value" />
|
||||
<property name="dataType">
|
||||
<value>0</value>
|
||||
</property>
|
||||
@@ -528,7 +525,6 @@
|
||||
<property name="name">
|
||||
<value>DistRange</value>
|
||||
</property>
|
||||
<property name="value" />
|
||||
<property name="dataType">
|
||||
<value>-6</value>
|
||||
</property>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<destination>{d886c7f1-fcf5-4a00-8b61-79115e41e0de}</destination>
|
||||
</relationship>
|
||||
<relationship name="output">
|
||||
<destination>{c751273e-6b77-46b1-8c19-a99f6f08e61e}</destination>
|
||||
<destination>{69ee688f-dc4e-4df2-a125-df79ed93217e}</destination>
|
||||
</relationship>
|
||||
</object>
|
||||
<object class="EventAutomatableProperties" id="{b0f7a24b-b6ab-4fb9-abcd-d48a5148b48e}" />
|
||||
@@ -172,7 +172,6 @@
|
||||
<property name="name">
|
||||
<value>SourcePos</value>
|
||||
</property>
|
||||
<property name="value" />
|
||||
<property name="dataType">
|
||||
<value>-2</value>
|
||||
</property>
|
||||
@@ -181,7 +180,6 @@
|
||||
<property name="name">
|
||||
<value>OverallGain</value>
|
||||
</property>
|
||||
<property name="value" />
|
||||
<property name="dataType">
|
||||
<value>-1</value>
|
||||
</property>
|
||||
@@ -510,7 +508,6 @@
|
||||
<property name="name">
|
||||
<value>SimOutputs</value>
|
||||
</property>
|
||||
<property name="value" />
|
||||
<property name="dataType">
|
||||
<value>0</value>
|
||||
</property>
|
||||
@@ -527,7 +524,6 @@
|
||||
<property name="name">
|
||||
<value>DistRange</value>
|
||||
</property>
|
||||
<property name="value" />
|
||||
<property name="dataType">
|
||||
<value>-6</value>
|
||||
</property>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<value>Voiceovers</value>
|
||||
</property>
|
||||
<relationship name="masters">
|
||||
<destination>{162960f4-09a2-4526-a61e-7ac7e219d27d}</destination>
|
||||
<destination>{2086c6d0-77e9-4bcf-967c-c4661459d91e}</destination>
|
||||
</relationship>
|
||||
<relationship name="effectChain">
|
||||
<destination>{18fe57ae-4110-48b9-92ff-598d3be28f6c}</destination>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<value>Music</value>
|
||||
</property>
|
||||
<relationship name="masters">
|
||||
<destination>{3d7079dd-e886-4e28-bb4b-7466e809d6f0}</destination>
|
||||
<destination>{7db632b8-c5c2-4e3e-ab97-f087b29d2976}</destination>
|
||||
</relationship>
|
||||
<relationship name="effectChain">
|
||||
<destination>{6f63c73c-f73f-479c-9da3-d9c4efc3e3d0}</destination>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<value>decayTime</value>
|
||||
</property>
|
||||
<property name="value">
|
||||
<value>3300</value>
|
||||
<value>3600</value>
|
||||
</property>
|
||||
<relationship name="automatableObject">
|
||||
<destination>{d00963d1-bc1e-48e6-8a9e-346bd1ed2e26}</destination>
|
||||
@@ -180,7 +180,7 @@
|
||||
<value>wetLevel</value>
|
||||
</property>
|
||||
<property name="value">
|
||||
<value>-16</value>
|
||||
<value>-14</value>
|
||||
</property>
|
||||
<relationship name="automatableObject">
|
||||
<destination>{d00963d1-bc1e-48e6-8a9e-346bd1ed2e26}</destination>
|
||||
|
||||
Reference in New Issue
Block a user