Skip to content
RED SAGSkills
medium10 pts · first answer countscsharpunitydebugging

Error after enemy is destroyed

After an enemy is destroyed, a MissingReferenceException appears whenever the player dies. What is the likely bug?

void OnEnable() {
    Player.OnDied += HandlePlayerDied;
}
void HandlePlayerDied() {
    transform.position = spawnPoint;
}
Choose one answer