'trying to invoke a method. method cannot be called

private void OnCollisionEnter(Collision other) 
{
    switch(other.gameObject.tag)
    {
        default:
            Invoke("ReloadScene", 1f); **//trying to invoke the method ReloadScene**
            break;
    }

void ReloadScene() **//This gets a yellow line under it and doesnt work**
{
    int currentScene = SceneManager.GetActiveScene().buildIndex;
    SceneManager.LoadScene(currentScene);
}

Whenever i try invoking my method ReloadScene gets a yellow squiggly line under it and states "The local function is declared but never used".



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source