LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

AudioListener.volume

Switch to Manual
public static float volume;

Description

Controls the game sound volume (0.0 to 1.0).

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { AudioListener.volume = 0.5F; } }