How are prefabs stored in the assets?

Hello!

I’m making some room editor for our dungeon game.
So far, each room is a prefab created through the editor, and contains instances of enemies prefabs in an empty Enemies game object. Is it the correct way to do it? Are each enemy stored as reference or is there copies of them in each and every room created? The other way would be to make some scriptable objects or spawners objects that would Instantiate the correct enemy when game starts, instead of just instantiating the whole prefab, but I won’t bother doing this if the enemies are stored as simple references to the “master” prefab.

Thanks in advance!

Here’s a screenshot of room prefab organization so far…
88324-screenshotunity.png

Unity doesn’t support nested prefabs by default, so if what you’re doing is adding an enemy prefab to a room prefab, the room prefab will decouple the enemy from the original prefab. If you modify the original enemy prefab, the one in the room will not change.

Instantiating the prefab with object spawners would probably be the best way to do this, or adding the nested prefab functionality (either implementing it yourself, or getting an existing asset from the store).