AudioSource.loop 循环


var loop : bool

Description描述

Is the audio clip looping?

音频剪辑循环播放?

If you disable looping on a playing AudioSource the sound will stop after the end of the current loop.

如果你播放一个音频禁用循环,该声音将在当前循环结束后停止播放。

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {void Awake() {audio.loop = false;}}
// Stop looping the sound//停止循环该声音audio.loop = false;


,