Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

global volume, mute and audio mode

Discussion in 'Audio & Video' started by llJIMBOBll, Dec 20, 2015.

  1. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Hi, this has got to be the worst thing about unity, the audio!

    I'm having trouble setting audio volume thru scripts, all i want is the basics, global volume, mute and audio mode. which i can set thru code so i can save.

    Can anyone help? thanx
     
    IgorAherne likes this.
  2. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    393
    use the static variable on the
    AudioListener.volume = 0.123f;
     
    Last edited: Dec 5, 2018
    llJIMBOBll likes this.
  3. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    xd, this was a few years back when i was a young noob :D cheers for finally answering, i was waiting all this time :D