Author Topic: PlaySound adds a sound in 3D - not good for UI  (Read 5476 times)

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
PlaySound adds a sound in 3D - not good for UI
« on: September 25, 2013, 03:11:31 PM »
so I added source.panLevel = 0 but this should be in the base code because we only have one audio listener in each scene and no audio layer.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: PlaySound adds a sound in 3D - not good for UI
« Reply #1 on: September 25, 2013, 07:19:32 PM »
NGUITools.PlaySound plays a sound on your AudioListener using PlayOneShot. That's 2D. Check the code.

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Re: PlaySound adds a sound in 3D - not good for UI
« Reply #2 on: September 25, 2013, 10:28:58 PM »
You sure it's 2D? Nothing in the doc indicates that, looks like an instance of an audiosource

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: PlaySound adds a sound in 3D - not good for UI
« Reply #3 on: September 26, 2013, 04:20:39 PM »
It doesn't instantiate anything. It simply plays the sound on your audiosource.

Do you see a game object created in your scene?