So I’m writing a script which ends the game when my player collides with an object. for that I created a GameManager object and added a GameManager script. inside this script is this
public class GameManager : MonoBehaviour
{*
public void EndGame();
{
}**
}
But for some reason, the code thinks that the first curly bracket* is ending with the 3d curly bracket** (the stars aren’t part of the code they are just there so I can show you what curly brackets I’m talking about)and if void EndGame was actually valid then the first bracket would end with the 4th and the second with the 3d.
I am also trying to reference this endgame function in another script but that isn’t important(i think if it is important tell me and I will send a photo of the script)
Hope that made sense
thank you.