I've been working on a project in unity and I'm trying to invoke a function with Invoke(string, float); though I get an error saying to check if my gameobject
is null, so I tried doing
debug.log(gameObject == null);
it returned with an error. I tried
debug.log(this == null);
result true?
Does anyone know how to fix this issue?
if(confetti != null)
{
confetti.Play();
}
if (this != null)
{
StartCoroutine("restart");
}
else
SceneManager.LoadScene("SampleScene");