Enemy List

So i have my code

    public static void RegisterEnemy(Enemy _enemy)
    {
        string _enemyID = _enemy.name;
        enemies.Add(_enemyID, _enemy);
    }

and i want to add this method when my zombie is respawn on map(Network) but i don’t know how do I do that :frowning:

On your zombie (Enemy.cs) put something like this in the Awake() method

YourStaticClass.RegisterEnemy(this);

Remember to clean up and deregister the zombie when it dies via the OnDestroy() method.

1 Like