playMaker

Author Topic: "Play Sound" / "Player Rnd Sound" as 3D  (Read 4745 times)

CookiMonster

  • Playmaker Newbie
  • *
  • Posts: 9
"Play Sound" / "Player Rnd Sound" as 3D
« on: May 26, 2015, 03:57:33 PM »
Hi, at the current state the Actions "Play Sound" and "Player Rnd Sound" will create One Shots as 2D Sounds. Is there a simple Solution for this?  ;D

charming_fox

  • Junior Playmaker
  • **
  • Posts: 62
Re: "Play Sound" / "Player Rnd Sound" as 3D
« Reply #1 on: July 24, 2015, 10:05:39 AM »
Would love to see an answer to this too, ni the middle of upgrading a Unity 4 project and this is going to be a huge, huge problem!

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: "Play Sound" / "Player Rnd Sound" as 3D
« Reply #2 on: July 24, 2015, 11:34:06 AM »
Did change with Unity 5? Because I'm pretty sure I've used those actions for 3D sound just fine

charming_fox

  • Junior Playmaker
  • **
  • Posts: 62
Re: "Play Sound" / "Player Rnd Sound" as 3D
« Reply #3 on: July 24, 2015, 04:19:44 PM »
I'm happy to be wrong, very happy, but every time I've tried it they've come out as 2D sounds with a set volume with no relation to distance from listener... v frustrating!

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: "Play Sound" / "Player Rnd Sound" as 3D
« Reply #4 on: July 24, 2015, 10:23:45 PM »
Check this out:
Quote
A number of things has changed in the AudioClip. First, there is no longer a 3D flag on the asset. This flag has been moved into the AudioSource in form of the Spatial Blend slider allowing you to, at runtime, morphing sounds from 2D to 3D. Old projects will get imported in such a way that AudioSource’s on GameObjects in the scene that have a clip assigned will get their Spatial Blend parameter set up according to the old 3D flag of the AudioClip. For obvious reasons this is not possible for scripts that dynamically assign clips to sources, so this requires manual fixing.

While the default setting for the old 3D property was true, by default in the new system, the default of the Spatial Blend parameter is set to 2D
from http://docs.unity3d.com/Manual/UpgradeGuide5-Audio.html

So sounds are by default 2D in Unity 5, before you had a checkbox for 3D sounds in the import settings of each file.

Probably isn't too hard to edit the Play Sound action so you can also set the Spatial Blend

pampapic

  • Playmaker Newbie
  • *
  • Posts: 15
Re: "Play Sound" / "Player Rnd Sound" as 3D
« Reply #5 on: September 19, 2015, 02:09:14 PM »
Quote
Probably isn't too hard to edit the Play Sound action so you can also set the Spatial Blend

I would like to do that :) I use the play sound action about 100 times and all the sounds are played with spatial blend set to 1 (3d), but I want to set it to 2D by default. Is it possible ? Someone knows how to do that ?