Https://www.udemy.com/course/unitycourse2/learn/lecture/24879772#content

I got stuck at Invoke please help.
https://www.udemy.com/course/unitycourse2/learn/lecture/24879772#content


1 Like

Hi! Welcome to the community!

Your brackets are the problem. You can create methods inside a method (these are called Local Methods), but for whatever reason you cannot invoke them, if you want the CrashSequence to be inside your OnCollisionEnter message that’s ok, but you cannot have your LoadNextLevel inside OnColissionEnter if you want to invoke it.

Your code needs to look something similar to the following

void OnCollisionEnter(Collision other)
{
    // Everything you want to do in here.
}

void LoadNextLevel()
{
    // Your load behaviour.
}

Hope this helps!

Hello Yee,

Thank you so much. It solve the problem and I saw what I did there, finally.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms