Tuesday, May 2, 2017

What Is Object Pooling And Why Do I Need It?

Why Do I Need Object Pooling? I think we'll work backwards and talk about why we need it, then talk about what it is... Let's think of a scenario where you have a shooting game.  Each bullet renders on the screen as a GameObject and the player is pretty trigger happy, letting loose four bullets a second for a duration of a three minutes. Over this time, the player has instantiated 720 game objects! Now I know what you may be...