Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PlayDelayed(float)

Plays the AudioSource.clip with a delay specified in seconds. Users are advised to use this function instead of the old Play(delay) function that took a delay specified in samples relative to a reference rate of 44.1 kHz as an argument.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AudioModule
public void PlayDelayed(float delay)

Parameters

delay

Delay time specified in seconds.

Remarks

Note: This function replaces the Play(delay) function when called with the delay-argument. In that function the delay had to be specified as samples relative to a reference rate of 44100. This is inconvenient when the engine is running on a different sample rate and the source sound has an even different rate. Working with delays specified in seconds makes this independent of these.