Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

var delay: float;
float delay;
delay as float

Description

Echo delay in ms. 10 to 5000. Default = 500.

	// Set the delay on the chorus filter to the max working value.

@script RequireComponent(AudioSource) @script RequireComponent(AudioEchoFilter)

function Start() { GetComponent(AudioEchoFilter).delay = 5000; }

using UnityEngine;
using System.Collections;

[RequireComponent(typeof(AudioSource))]
[RequireComponent(typeof(AudioEchoFilter))]
public class ExampleClass : MonoBehaviour {
    void Start() {
        GetComponent<AudioEchoFilter>().delay = 5000;
    }
}
import UnityEngine
import System.Collections

[RequireComponent(typeof(AudioSource))]
[RequireComponent(typeof(AudioEchoFilter))]
public class ExampleClass(MonoBehaviour):

	def Start() as void:
		GetComponent[of AudioEchoFilter]().delay = 5000