Select your preferred scripting language. All code snippets will be displayed in this language.
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseSets how much the 3d engine has an effect on the channel.
Useful for morphing an AudioSource from 3D(1.0f) to 2D(0.0f).
// Hear the audio clip in both channels (2D) function Start() { audio.panLevel = 0; }
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Start() { audio.panLevel = 0; } }
import UnityEngine import System.Collections public class ExampleClass(MonoBehaviour): def Start() as void: audio.panLevel = 0