Not Respawning Enemy when Killing Them After Exiting then Reentering the Level

Hi everyone.

Kinda newbie here, im trying to make a platformer game where once you kill an enemy on one level, they won’t respawn after the player leaves that level and comes back to it.

The idea i had in achiving that is by making an enemy spawner that checks if its spawned enemy is killed, which in turn updates a variable in a game instancer for that spicific spawner to not respawn the enemy next time the player enters the level.

And the problem is i have no idea how can i do that, or if that’s the correct approach to this problem in the first place.

Would happly accept any help or suggestions, Thanks.

use save game objects and make an array of enemies (or array of bools ).save game whenever you want.
load save game object before spawn and spawn ones that have their boolean options false.

I’ve tried it out and it worked, thanks for letting me know of this approach