Hello there!
I’m in the polish phase of my mobile game project and looking for any optimization possible.
I have an enemy template prefab, and all my enemies in the game are children of this main prefab. The main prefab holds a “PoisonVFX” particle system, also a prefab, that I activate or deactivate at runtime (enemies can deal poison or not depending on the context).

Then I have some prefab levels, that are basically a big hierarchy of enemies. All of them of course hold the PoisonVFX, sometimes deactivated.
Now here is the thing, in the memory profiler, this PoisonVFX particle system is shown hundreds of times !! I’m not sure how to set it up so it’s only used once ? Each of them is only 11.8KB but there are so many of them that I believe I could spare something around 10MB of RAM (which comparatively would be HUGE regarding my current optimization efforts).
Thanks for your help 
What you can do is instantiate the PoisonVFX prefab containing the particle system at runtime only when you need it to be active so there is no deactivated ones taking memory. So instead of adding the prefab as a child of the enemy prefab beforehand you should add a reference to the PoisonVFX prefab in a script in the enemy prefab and then at runtime when the poison vfx needs to activate instantiate the prefab with the enemy object as it’s parent. If the poison needs to deactivate you can destroy the instantiated one to free the memory and instantiate it again if needed later
Hello ! Thanks for your quick reply. That sounds like a reasonable solution 
If I kept my current setup but the Poison particle system was not a prefab (but a regular gameobject) it would still take up the same memory space right ?
Yes a prefab added into the hierarchy in edit mode (which is called a prefab instance) takes up same memory as a non prefab object with the same content. This is because the prefab instance is actually a copy of the data in the prefab. Like when instantiating it via code it creates a copy. In edit mode the copy is still synced with the source prefab so it seems like a reference to the same prefab data in memory but actually is a copy even at that point. In play mode even that link to the source prefab is lost so it is then same as any object in hierarchy. Assets outside the hierarchy like texture or mesh referenced by e.g. a mesh renderer are not copied and still point to the original data and are shared between mesh renderers using the same assets. Only the mesh renderer itself is a copy because it is part of the gameobject in the hierarchy. So this copying only applies to gameobjects and components that are in the hierarchy and not to referenced assets that are outside the scene or prefab
Thanks a lot for the detailed answer, appreciated 