Dungeon Crawler Doors open when enemies are defeated???

I’ve been working on a 2d dungeon crawler (very similar dungeon layout as the binding of Isaac), and I just can’t seem to figure out how to make the enemy prefab communicate to the room to open the doors. I haven’t really gotten anywhere in my code, so I won’t show any of it. I would really appreciate some help.

Take a look into delegates/events. There are many tutorials out there on youtube. Look at both c# delegates/events and Unity Events

  • keep a count of enemies remaining
  • each enemy that dies subtract 1 from the count
  • when the count is zero open the doors

Sorry, I figured it out just today. Turns out my enemy’s rigidbody was set to static, so my triggers wouldn’t pick it up. So I just set my trigger to check if enemy is inside of it, and boom. Thanks for the help anyways though!