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)

JavaScript
// Hear the audio clip in both channels (2D)
function Start() {
audio.panLevel = 0;
}

using UnityEngine;
using System.Collections;

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

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Start():
audio.panLevel = 0