AudioListener.velocityUpdateMode 速度更新模式

var velocityUpdateMode : AudioVelocityUpdateMode


This lets you set whether the Audio Listener should be updated in the fixed or dynamic update.

可让你设置Audio Listener是否应该用固定或动态更新。

Make sure this is set to update in the same update loop as the Audio Listener is moved in if you are experiencing problems with Doppler effect simulation. The default setting will automatically set the listener to be updated in the fixed update loop if it is attached to a rigidbody, and dynamic otherwise.

如果你遇到了多普勒效应模拟问题,作为Audio Listener移动,请确保这个设置在相同更新循环内。如果它被附加到一个刚体,默认设置将自动设置该侦听器更新以固定更新循环;动态使用其他方式。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		audio.velocityUpdateMode = AudioVelocityUpdateMode.Fixed;
audio.velocityUpdateMode = AudioVelocityUpdateMode.Fixed;
Page last updated: 2011-1-13