AudioSource.loop Manual     Reference     Scripting  
Scripting > Runtime Classes > AudioSource
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.

JavaScripts
// Stop looping the sound
audio.loop = false;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
audio.loop = false;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
audio.loop = false