wie fixt man cs1061 in Unity?

hi ich arbeite gerade an Einem FPS game in Unity und habe das Problem das Error cs 1061 auftritt. und ich verstehe nicht wieso

das ist die Error Meldung

(Assets\Scripts\EnemyManager.cs(20,29): error CS1061: 'GameManager' does not contain a definition for 'enemiesAlive' and no accessible extension method 'enemiesAlive' accepting a first argument of type 'GameManager' could be found (are you missing a using directive or an assembly reference?)

das ist mein Enemy Skript

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEngine.AI;

public class EnemyManager : MonoBehaviour

{

  public GameObject Player;

  public Animator enemyAnimator;

  public float damage = 20f;

  public float health = 100f;

  public GameManager gameManager;

  public void Hit(float damage)

  {

    health -= damage;

    if (health <= 0)

    {

      gameManager.enemiesAlive--;

      Destroy(gameObject);

    }

  }

  // Start is called before the first frame update

  void Start()

  {

    Player = GameObject.FindGameObjectWithTag("Player");

  }

  // Update is called once per frame

  void Update()

  {

    GetComponent<NavMeshAgent>().destination = Player.transform.position;

    if (GetComponent<NavMeshAgent>().velocity.magnitude > 1)

    {

      enemyAnimator.SetBool("isRuning", true);

    }

    else

    {

      enemyAnimator.SetBool("isRuning", false);

    }

  }

  private void OnCollisionEnter(Collision collision)

  {

    if (collision.gameObject == Player)

    {

      Player.GetComponent<PlayerManager>().Hit(damage);

    }

  }

}

danke für die Hilfe

Unity 3D
Wie fixt man diesen unity Fehler?

hi; ich mache grade ein FPS Shooter game und habe das Problem das wenn ich im Skript für die Waffe den Damage auf 30 setze hat der Enemy mit einem Schuss nur noch 30hp aber dann ist er unsterblich.

Hier das gun skript

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class Gun : MonoBehaviour

{

  public float damage = 10f;

  public float range = 100f;

  public float Firerate = 15f;

  public Camera fpscam;

  private float nextTimeToFire = 0f;

  // Start is called before the first frame update

  void Start()

  {

  }

  // Update is called once per frame

  void Update()

  {

    if (Input.GetMouseButton(0) && Time.time >= nextTimeToFire)

    {

      nextTimeToFire = Time.time + 1f / Firerate;

      Shoot();

    }

  }

  void Shoot()

  {

    RaycastHit hit;

    if (Physics.Raycast(fpscam.transform.position, fpscam.transform.forward, out hit, range))

    {

      Opfer opfer = hit.transform.GetComponent<Opfer>();

      if (opfer != null)

      {

        opfer.TakeDamage(damage);

      }

      Debug.Log(hit.transform.name);

    }

  }

}

und hier das Enemy Health skript

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class Opfer : MonoBehaviour

{

  public float health = 100f;

  public void TakeDamage(float amount)

  {

    health = amount;

    if(health <= 0)

    {

      Destroy(gameObject);

    }

  }

}

und das Enemy skript

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEngine.AI;

public class EnamyManager : MonoBehaviour

{

  public GameObject Player;

  public Animator enemyAnimator;

  public float damage = 30f;

  // Start is called before the first frame update

  void Start()

  {

    Player = GameObject.FindGameObjectWithTag("Player");

  }

  // Update is called once per frame

  void Update()

  {

    GetComponent<NavMeshAgent>().destination = Player.transform.position;

    if (GetComponent<NavMeshAgent>().velocity.magnitude > 1)

    {

      enemyAnimator.SetBool("isRuning", true);

    }

    else

    {

      enemyAnimator.SetBool("isRuning", false);  

    }

  }

  private void OnCollisionEnter(Collision collision)

  {

    if(collision.gameObject == Player)

    {

      Player.GetComponent<PlayerManager>().Hit(damage);

    }

  }

}

Vielen dank wenn mir jemand helfen kann

Error, Unity 3D