invoke() Function in unity [duplicate]
问题 This question already has an answer here : When i use Invoke to a method i want to use i can't call it anymore? (1 answer) Closed last month . Its almost my first time using C sharp and unity. I am trying to use invoke() function in unity but its giving the error "Trying to Invoke method: EndGame.Restart1 couldn't be called." public class EndGame : MonoBehaviour { bool GameHasEnded = false; public float Timer = 1f; public void endgame() { if (!GameHasEnded) { GameHasEnded = true; Debug.Log(