Search Unity

Audio Even though Audio Source is assigned to Mixer Channel, Plays Independently Anyway

Discussion in 'Audio & Video' started by Xander-Davis, Jul 27, 2017.

  1. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    One of my audio sources, an empty game object that is used to spawn projectiles and play the projectile sound from, is assigned to the Weapons channel. The sound is triggered by PlayMaker with Play Sound (which requires an Audio Source-- the one assigned to the channel).

    However, if I mute the Weapons channel, the sound still plays anyway. Even if I mute the entire Mixer, the sound still plays.

    It seems Unity is failing to play the from the Audio Source's assigned Channel with the Mixer and instead is playing it through Unity's general sound.

    Any advice for what's going on here and how I might force the sound to play through the Audio Source's assigned Channel?
     
  2. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,304
    Then it's not using the audiosource you are giving it.
    Either it's explicitly creating a new one, or, more likely, its using a play method that creates one internally at runtime.

    Are you sure you're using the right function?
    http://hutonggames.com/playmakerforum/index.php?topic=6431.0
     
    Last edited: Jul 28, 2017
  3. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    I figured out that PlayMaker's 'Play Sound' action doesn't use the Mixer (probably sends directly to the Audio Listener but from a point?). Anyway, I tried 'Audio Play' instead, and it routed through the Mixer. Yay!