playMaker

Author Topic: Play Sound But With Ticks for Dopplar and Spatialize  (Read 702 times)

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • View Profile
    • My Video Game Projects Web Site
Play Sound But With Ticks for Dopplar and Spatialize
« on: June 22, 2020, 11:06:38 AM »
I need sound effects that don't sound weird for menus.
There are lots of Play Sound actions. Play Sound Simple, Advanced, 2, 3, etc. Many are very large and cumbersome, or require audio sources set up before hand. The default Play Sound action is great except it lacks ONE thing.

What would be great is an action like the normal default Play Sound (creates a one-shot game object) but with a SIMPLE tick box to turn off Spatialization and Doppler, for menus or other sounds that should just exist on the camera.

Currently playing sounds while a menu is open and the character is moving, it happens at a spot in space, and the pitch changes, and the Play Sound action cannot disable this. How do other people quickly make sounds play for menus? Is there something I'm missing?

Here is a picture of what would be the perfect Play Sound action for me. Almost exactly like the default, except Spatialize and Doppler start OFF and can be ticked ON to create a normal spatial one-shot audio like before.

As you can see this version is still VERY SIMPLE, except with those two added bools.

I kind of feel the default Play Sound should have these ticks, but that could just be specific to how I always use it.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6395
    • View Profile
    • jinxtergames
Re: Play Sound But With Ticks for Dopplar and Spatialize
« Reply #1 on: June 22, 2020, 02:20:54 PM »
Hi.
You should use 'Audio Play' and use the 'Audio Mixer' and group your audio
(Player / Enemies / Ambient / Music / Menu for example)

Play Sound is good if you need to play a sound once in the whole scene.
As 'Play Sound' Creates a Audio Source Object/Component every time it is played and also destroyed when done playing

also if you are doing a full game (not prototype) you probably want the player to be able to set volumes for music/ambient/vfx and you wont be able to do that easily with Play sound.

You can follow the unity tutorial for audio mixer and you can find some AudioMixer actions on the ecosystem.
Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!