Forum rules - please read before posting.

Bit unclear about Sound Actions

edited June 2019 in Technical Q&A

So currently in my game I have many sound Game Objects which hold multiple Sound:Audio Source components with clips attached. Different sound Game Objects for different rooms.

In Action Lists I add Sound:Play nodes, then drag in the Game Object to Sound Object and drag in the clip from the Project file structure to New Clip.

This works, but it also works if the sound clip is not even in the Sound:Audio Source component and I just drag straight from the Project file structure into the node. But I must still have a sound Game Object in the node too.

Do I need to have clips in the Game Objects at all?

How do others organise the functionallity of their action audio sounds?

What is best practice?

Comments

  • To play a sound via the Sound: Play Action, you need two things: an AudioClip asset, and a Sound to play it from.

    Supplying an AudioClip in the Action is optional. If a Sound GO already has an AudioClip assigned in its AudioSource component, that'll be what gets played. Assigning an AudioClip in the Action allows you to use the same Sound to play multiple clips, provided that they don't play at the same time.

    However, if the audio is 2D (i.e. it's position is not important), you can also rely on the Sound: Play one-shot Action, which allows you to play an AudioClip without a Sound. Ambience and music also have dedicated Actions for playback handling.

  • Right, thanks for that.

  • edited June 2019

    So when using that Sound: Play one-shot the audio is panned in my RIGHT ear instead of central. I am assuming this is some setting somewhere in AC. Any idea where this would be?

    note: Outside of AC the original audio is panned centrally.

  • edited June 2019

    Apologies, I was mistaken about the Sound: Play one-shot Action playing 2D sounds. They are, however, played at the position of the main camera by default - which should be the same effect.

    Assuming you don't have any custom camera configuration, try attaching an empty to your MainCamera, moving it a bit in front, and assigning that in the Action's Position (optional) field.

    Alternatively, the Sound: Play Action will also rely on your scene's Default sound (as defined in the Scene Manager) if you supply an AudioClip but no Sound object to play it from. Since the default sound is also used for e.g. menu sounds, it's recommended to set that to 2D anyway.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.