AudioSource.priority 优先权
var priority : int
Description描述
Sets the priority of the AudioSource
设置AudioSource的优先权。
Unity is virtualizing AudioSources, when there's more AudioSources playing than available hardware channels. The AudioSources with lowest priority (and audibility) is virtualized first. Priority is an integer between 0 and 256. 0=highest priority, 256=lowest priority
当有播放的AudioSource比可用的硬件通道多,Unity虚拟化AudioSource。AudioSource带有最低的优先权(和可听度)被首先虚拟化。优先权是一个整数在0到256之间。0=最高优先权,256=最低优先权。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Awake() {
audio.priority = 256;
}
}
// occlude this sound if we dont have hardware resources to virtualize it
//如果没有硬件资源来虚拟化它,屏蔽这个声音
audio.priority = 256;
最后修改:2011年4月5日 Tuesday 19:40