Hi,
How can I play Sequencer command from script. When dialogue is not started.
Use case:
Player is walking, he enter trigger and the AudioWaitOnce is invoked and the player says "Bla bla bla "
Scene setup:
I have QuestControl, that controls the QuestSControl.SendToMessageSystem Explored:Stairs message.
I would like to add the audio that is localized.
how Play AudioWaitOnce(entrytaglocal) from script
Re: how Play AudioWaitOnce(entrytaglocal) from script
ok,
found solution
found solution
Code: Select all
public void PlayAudioWaitOnce(string audioClipName)
{
DialogueManager.PlaySequence($"AudioWaitOnce({audioClipName})");
}
Re: how Play AudioWaitOnce(entrytaglocal) from script
But the above code doesn't work with localization package. Without it it works properly.
Re: how Play AudioWaitOnce(entrytaglocal) from script
Hi,
What do you mean? Does the problem have compile errors? Does it log errors when you play? Does it work with the default language but not with localization?
What do you mean? Does the problem have compile errors? Does it log errors when you play? Does it work with the default language but not with localization?
Re: how Play AudioWaitOnce(entrytaglocal) from script
Hi,
I added the unity localization package and it works very good with the Dialogue Sequences with entrytaglocal.
It doesn't work with the code below, because it doesn't add the locale identifier as it is done with the entrytaglocal.
But I found solution and I add the locale identifier by my own. The code below works properly.
I hope this post one day help somebody.
I added the unity localization package and it works very good with the Dialogue Sequences with entrytaglocal.
It doesn't work with the code below, because it doesn't add the locale identifier as it is done with the entrytaglocal.
Code: Select all
DialogueManager.PlaySequence($"AudioWaitOnce({audioClipName})");
But I found solution and I add the locale identifier by my own. The code below works properly.
Code: Select all
var locale = LocalizationSettings.SelectedLocale;
DialogueManager.PlaySequence($"AudioWaitOnce({audioClipName}_{locale.Identifier.Code})");
- Attachments
-
- Screen_00241.png (48.48 KiB) Viewed 213 times
Re: how Play AudioWaitOnce(entrytaglocal) from script
Thanks for sharing.