Page 1 of 1

Play a sound?

Posted: Wed May 03, 2023 10:24 am
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.

Re: Play a sound?

Posted: Wed May 03, 2023 10:53 am
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

Re: Play a sound?

Posted: Thu May 04, 2023 2:27 am
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.

Re: Play a sound?

Posted: Thu May 04, 2023 7:58 am
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.