- Home /
This question was
closed Jun 19, 2017 at 07:27 PM by
Rocl.
end of line error
public class GameManager : MonoBehaviour {
bool gameHasEnded = false;
public void EndGame ()
{
if (gameHasEnded == false)
{
Debug.Log ("Game over");
}
if (RenderBuffer.position.y < -1f)
{
FindObjectOfType<GameManager> ().EndGame ();
}
} }
if i use this code, it gives the end-of-line error, i know that i miss a bracket but i don't know where
Comment
Answer by JxWolfe · Jun 18, 2017 at 08:20 PM
I don't have your full code however my guess is that you don't have a bracket at the end of the code, to contain the MonoBehaviour...
Follow this Question
Related Questions
How to Fix Compilier Errors? 0 Answers
Unity clearing my scene when I press play in the editor 0 Answers
GetComponent Picking up multiple scripts from differrent objects? 1 Answer
"Error building Player" WebGL build error 2 Answers
cannot be used with a left hand side of type 'float' and a right hand side of type 'Object' 1 Answer