- Home /
When to Destroy Multiple Items
What is the best way to destroy multiple items? Right now I am destroying, yielding, loading, yielding, and then doing it all over again for each item that gets changed in my game. If I do everything at once the game lags. This spreads out the load but sometimes if the item is really big, the game lags.
Is it best to delete everything at once and then load in new items or do I need to spread out the load even more?
Can you not destroy/load but keep things around and inactive?
What the hell are you doing, where you have to instantiate and destroy constantly?
I am not instantiating and destroying constantly, but when I do instantiate and destroy something, it is usually something huge like a character and all of his assets. I want it to be as smooth as possible.
As whydoidoit states, and before Fattie sees this (!), you should consider pooling your objects, then setting them active or not.
Your answer
Follow this Question
Related Questions
Do empty transforms take up much CPU power? 1 Answer
Why are my cached (in an array) gameobjects disappearing? 0 Answers
Having problems with destroying, instantiating 0 Answers
Instantiate Pre-fab clone altered on Instantiate 2 Answers
How to Destroy a GameObject when the player looks away 1 Answer