how do i add a delay before gaze and pick loads new scene

Hi
I have this script but I want to ensure the player meant to look at the button so need to introduce an e.g. 3 second delay before it confirms and loads the new scene.

I would really appreciate it if someone could tell me how to do this or point me to a tutorial that explain it since I only seem to be able to find very old tutorials that bear little resemblance to 2019 version of unity and i get stuck every time!

using UnityEngine;
using UnityEngine.SceneManagement;

public class Scenecontroller : MonoBehaviour
{
public void ChangeScene (string scenename)
{
SceneManager.LoadScene(scenename);
}
}

thanks for your help!
Nick

Hello.

Learn about IEnumerators (Coroutines). You just need to do a coroutine that waits 3 seconds to execute. Ad a Input detection to stop that coroutine if the bulton or click is detected.

Bye.

thanks - will investigate

i feared that might be the case… newbie hacker feels daunted but will battle on!