help,Deleting specific Game Objects that has been instantiated

hi i am new to coding currently trying to make a game where rooms spawn in random configurations with multiple paths but i have run into a problem where the buildings can spawn on top of each other.i have added a trigger at the end of each room to delete the room once you leave it. only problem is it wont delete the other paths that get created and any new rooms that spawn have the chance of spawning over the top of them what would be the best way of solving this problem. is there a way to delete these rooms?
i am using Instantiate to spawn these rooms :slight_smile:

,hi i am new to coding currently trying to make a game where rooms spawn in random configurations with multiple paths but i have run into a problem where the buildings can spawn on top of each other.i have added a trigger at the end of each room to delete the room once you leave it. only problem is it wont delete the other paths that get created and any new rooms that spawn have the chance of spawning over the top of them what would be the best way of solving this problem. is there a way to delete these rooms?
i am using Instantiate to spawn these rooms :slight_smile:

if the object that needs be deleted has a script then when you want the object to be destroyed, inside of its script do: Destroy(gameObject);