Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

var dopplerLevel: float;
float dopplerLevel;
dopplerLevel as float

Description

Sets the Doppler scale for this AudioSource.

	function Start() {
		// Dont use doppler effects.
		audio.dopplerLevel = 0;
	}
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Start() {
        audio.dopplerLevel = 0;
    }
}
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	def Start() as void:
		audio.dopplerLevel = 0