If I create a prefab out of an object on scene will my game take more memory in Unity?

I have 30 enemies on my scene. I created a prefab for every one of them. I am going to use each of the created prefabs to respawn enemies in the same places where I put each one of them, with the same configurations.

Now, my question is if it is ok to create a lot of prefabs? Will Unity know how to prevent them taking a lot of space? Or will I have troubles with memory when I will create more levels (read here scenes) with even greater amount of enemies, given that each enemy will have its own prefab?

  • \$\begingroup\$ This looks like a question you can answer for yourself by generating a build without prefabs, then generating a build with prefabs, and comparing their memory use. What have the results of this experiment been when you've tried it? Have you measured any meaningful difference at all? \$\endgroup\$
    – DMGregory
    Jun 16, 2021 at 22:22

1 Answer 1


.PREFAB files are just text files taking very little space. Prefabs are just saved information of how the game object should be configured or what components should be attached at the time of instantiation into the scene. So, creating lots of prefabs can consume very little memory or disk space only in the editor mode. But in the final build, there is no effect of creating lots of prefabs.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .