Hi,
I've added cutscene audio to my dialogue and following the entry tag tutorials, I have added ``AudioWait(entrytag)`` as the default sequence, and also named my audio files with the correct entry tags.
The audio is working fine and with minimal effort/setup (thanks a lot for making this so easy).
But the problem is that for some actors its using a different audio source?
I know that the audio source for the dialogue audio is the one that is already on the prefab in ``Dialogue Panel > Main Panel > Text Panel > Subtitle Panel > Subtitle TMP``
But when the audio/ dialogue is played, this source is only used for some actors.
For example, for most of the actors, the audio is playing but its not this source such that its audio clip is empty:
Here, the audio is playing, and I can hear it but its not using the audio source on Subtitle TMP.
While for a few actors, this field is populated and this audio source is used, as can be seen from below screenshot
Furthermore, it is not taking the volume from my Mixer which is 0.8, its very quiet at 0.1 volume, and the other actors are using an unknown audio source so I cant control their volume either.
Thanks
Different AudioSource being used for some actors?
Re: Different AudioSource being used for some actors?
Hi,
This sequencer command:
AudioWait(entrytag)
is equivalent to:
AudioWait(entrytag, speaker)
This plays the audio clip on the speaker GameObject's Audio Source. If the speaker doesn't have an Audio Source, it will add a default one.
To know which GameObject is a dialogue entry's speaker, please see: Character GameObject Assignments. Check the conversation's properties, the dialogue entry node's Actor dropdown, the speaker GameObject (e.g., if it has a Dialogue Actor component), and the Conversation Actor and Conversation Conversant fields on the Dialogue System Trigger if you're using one.
Add an Audio Source to the speaker GameOBject and assign your mixer group to it.
This sequencer command:
AudioWait(entrytag)
is equivalent to:
AudioWait(entrytag, speaker)
This plays the audio clip on the speaker GameObject's Audio Source. If the speaker doesn't have an Audio Source, it will add a default one.
To know which GameObject is a dialogue entry's speaker, please see: Character GameObject Assignments. Check the conversation's properties, the dialogue entry node's Actor dropdown, the speaker GameObject (e.g., if it has a Dialogue Actor component), and the Conversation Actor and Conversation Conversant fields on the Dialogue System Trigger if you're using one.
Add an Audio Source to the speaker GameOBject and assign your mixer group to it.
Re: Different AudioSource being used for some actors?
Thanks for the quick reply, Toni.
But I would have the gameObjects own audio source use another mixer i.e. a mixer I setup for sound effects.
Is there a way to force all dialogue to be played via the audio source on the text panel of the dialogue prefab?
Also, I am not using any actor component or dialogue trigger component in my scenes.
Thanks
But I would have the gameObjects own audio source use another mixer i.e. a mixer I setup for sound effects.
Is there a way to force all dialogue to be played via the audio source on the text panel of the dialogue prefab?
Also, I am not using any actor component or dialogue trigger component in my scenes.
Thanks
Re: Different AudioSource being used for some actors?
Hi,
If you're using the AudioWait() command, you can specify the text panel as the subject. If your text panel is uniquely named "Text Panel", use this sequence:
Alternatively, you can make a subclass of AudioWait() and override GetAudioSource() to always return the Text Panel's audio source. Example:
In which case you'd use:
If you're using the AudioWait() command, you can specify the text panel as the subject. If your text panel is uniquely named "Text Panel", use this sequence:
Code: Select all
AudioWait(entrytag, Text Panel)
Code: Select all
namespace PixelCrushers.DialogueSystem.SequencerCommands
{
public class SequencerCommandAudioWaitText : SequencerCommandAudioWait
{
private static AudioSource textPanelAudioSource = null;
protected override AudioSource GetAudioSource(Transform subject)
{
if (textPanelAudioSource == null) textPanelAudioSource = GameObject.Find("Text Panel").GetComponent<AudioSource>();
return textPanelAudioSource;
}
}
}
Code: Select all
AudioWaitText(entrytag)
Re: Different AudioSource being used for some actors?
The worked perfectly. Thanks a lot
Code: Select all
AudioWait(entrytag, Text Panel)
Re: Different AudioSource being used for some actors?
Glad to help!