Hi guys,
How can i do for start an audioclip after 3 second that a key is pressed?
Thank you!
Hi guys,
How can i do for start an audioclip after 3 second that a key is pressed?
Thank you!
You need to define a coroutine that will be triggered and wait for the amount of time before calling the another method.
void Start(){
StartCoroutine(WaitMethod());
}
IEnumerator WaitMethod(){
yield return new WaitForSeconds(3f);
audio.Play();
}