Play a sound?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
DemencjaBBG
Posts: 4
Joined: Mon Oct 10, 2022 8:05 am

Play a sound?

Post by DemencjaBBG »

I would like the sound to play along with the text. How to do it properly?

Or please point me to a tutorial that explains it.
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Play a sound?

Post by Tony Li »

Hi,

The quick way is to put the audio file in a folder named Resources. Then drag it into the dialogue entry's Sequence field.

The better way is to use entrytags. See: Cutscene Sequence Tutorials
DemencjaBBG
Posts: 4
Joined: Mon Oct 10, 2022 8:05 am

Re: Play a sound?

Post by DemencjaBBG »

Thank you for your answer.

And can I use addressables? On the official unity website it says that Resources are bad and suggest using addressables.
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Play a sound?

Post by Tony Li »

It's a good idea to understand why Resources can be bad. In some cases it can be better than Addressables. For example, if you need to load something small at the start of your game and keep it in memory during the whole game, Resources is good.

That said, the Dialogue System does support addressables. Tick the Welcome Window's USE_ADDRESSABLES checkbox. Inspect your audio clip, click the Addressable checkbox, and set the addressable key.
Post Reply