- Home /
Purpose of the Destroy Function
What is the main purpose of the destroy function? I know it is used to destroy objects in a scene but in terms of memory, does it slow down the game if objects arent destroyed? I am curious because sometimes when I have many objects in the scene and doing certain things, it tends to make the game slow.
I need to know because I have some particles in a game where I want them to still appear to be visible.
Answer by SunnyChow · Jan 13, 2014 at 06:26 AM
Yes it will slow down the game. Even an GameObject costs a little time for garbage collector (the system that unity manage memory). And if your GameObjects have components. Every components will be progressed. I feel that you are making particle effect with individual GameObject. I recommend you to use Unity's particle system to do that.