AudioSource.panLevel Manual     Reference     Scripting  
Scripting > Runtime Classes > AudioSource
AudioSource.panLevel

var panLevel : float

Description

Sets how much the 3d engine has an effect on the channel.

Useful for morphing an AudioSource from 3D(1.0f) to 2D(0.0f)

JavaScripts
// Hear the audio clip in both channels (2D)

audio.panLevel = 0;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
audio.panLevel = 0;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
audio.panLevel = 0