Hey, i am a pretty new developer and was just following along brackeys tuorial on how to make a video game.
i wanted to call a function from another script using FindObjectOfType as he has done in his tutorial, however in my project i get the error:
Assets/Scripts/PlayerMovement.cs(40,13): error CS0103: The name `FindObjectOfType’ does not exist in the current context
my code seems to be ok, can anyone help me?
[ if(rb.position.y < -2f)
Game over is a function that ends the the game and sits on the Game Object GameManager, that has a script called GameManager.
am i missing something completly obvious here?