I managed to have a basic map generation algorhytm, but now it needs some content.
I generate abstract map data, which then will be used to build the map itself.
When I want to generate monsters, chests, entrances, etc, I have a prefab, and I will determine it's placement, then register it in the mapdata.
The problem is that I want to configure them as well, like affixes, stats, or where those entrances lead, etc. But the component is only available after the map is built. At generation I have only the prefab, so I have to transfer the generated configuration to the map builder somehow.
If I could clone the prefab, modify the clone's values and store that prefab.. . that would be great. But I can only instantiate prefabs, and I can't clone them without making a new asset.