There’s pros and cons to both.
In simple terms…
Instantiate/Destory:
pro - easy to implement, keeps memory usage to only that what is needed (great for low memory systems)
cons - expensive to perform, dogs down garbage collection
Enable/Disable:
pro - fast on the processor, does not incur expensive garbage collector calls
cons - complicated to implement, can fill up memory if objects are complex (bad for low memory systems), can result in bugs if the state from previous time enabled isn’t reset properly
Personally what I implemented both into one system in my ‘com.spacepuppy.Spawn’ namespace of my framework. In it the primary facade is the ‘SpawnPool’.
SpawnPool is a multiton factory (a multiton is like a singleton that can have more than one instance. There is a default global instance, as well as secondary instances that can be used if the default one is to be overriden).
The SpawnPool maintains prefabs that can be cached for reuse. The SpawnPool has a design time manager that you add prefabs to declaring them cacheable. When you do this you can select metrics for their caching:
quantity to cache on load
buffer quantity to load if the cache runs dry
max quantity allowed to be cached in total
A profile can even be made that allow varying quantities depending on user system specs. Low memory system, no caching. High memory system, more caching.
If a prefab is called to be spawned that is not part of the SpawnPool, then it just Instantiates it. This way all code just needs to call ‘SpawnPool.Spawn(…)’ and the SpawnPool takes care of the rest… making it a replacement for ‘Instantiate’.
There is also a function called ‘Kill’ that handles destroying gameobjects which replaces the ‘Object.Destroy’ function. It will determine if the GameObject is a cached object and replace it into the cache pool. Otherwise call Destroy like normal.
This way I can write code for any project, use the SpawnPool, and if I want to turn off caching… I just go into the SpawnPool manager and turn it off. But all the code still gets performed the same way.