unity – How to use GameManager to get GameOver () from another script?

I am trying to make a gameover text show when the player leaves the plane area. In GameManager.cs I have written:

    public void GameOver()

And in PlayerController.cs I used the following code:

    private GameManager gameManager;


    void Update()
        float horizontalInput = Input.GetAxis("Horizontal");
        float verticalInput = Input.GetAxis("Vertical");

        playerRb.AddForce(Vector3.right * speed * horizontalInput);
        playerRb.AddForce(Vector3.forward * speed * verticalInput);

        if (transform.position.y < -4)

But this really doesn't work, and the console is giving me this message:

Assets / Scripts / PlayerController.cs (8.25): warning CS0649: Field & # 39; PlayerController.gameManager & # 39; it is never assigned and will always have its default value null

I have already used OnTriggerEnter (for power-ups) and OnCollisionEnter (for enemies). How can I display the GameOver text when the player leaves the "Plane"?