Destroying GameObjects and best practices

I’ve been told that it isn’t a good practice to instantiate/destroy gameObjects due to memory reassigning on real time.

Instead of doing that, he pre-initializes the amount of objects to be instantiated and he never destroys them. Instead, he just disables the gameObject.

What do you think about instantiating and destroying gameObjects on real time? Is this such a bad practice?

He also said that instantiating objects and destroying them is OK, if those objects aren’t very fast destroyed. So if you’re only going to spawn 1 guy once or twice, it won’t hurt to use instantiate. Pooling is actually good for rapid instantiating and destroying (bullets, large number of enemies etc.)

Just keep that in mind! :slight_smile: