
Object pooling is one of the easiest forms of optimization in Unity. Just recently we implemented the Factory Design Pattern which is related to today’s subject.
Object Pooling?
Let’s begin by explaining what Object Pooling is. So this is an optimization practice which is based on instance reusability. In Factory, we created a new instance of prefab, and later we destroyed it which is not an issue when we want to create just a few instances.
Problems start arriving when we create a lot of new instances, for example when shooting bullets from a gun, or we spawn a lot of special effects.
Continue reading “How to implement Object Pooling in Unity”