Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

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

AudioSource.panLevel

Switch to Manual
public 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).

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