- Home /
The question is answered, right answer was accepted
Reset prefab instead of destroying and instantiating again
Hi. My question might not be asked properly. But I want to ask if there is any method of reseting prefab without instantiating and destroying it again and again. Because it causes lag in the game.
I am instantiating traffic cars and coins in front of player car. And then after sometime destroy that object to avoid memory leakage.
Answer by AeonIxion · Apr 14, 2015 at 02:06 PM
Instead of instantiating new cars every time, use the old ones that you are destroying atm. Just set their position to the position you would normally instantiate a new car.
Follow this Question
Related Questions
How to detect a single collision when 2 identical gameobjects collide. 1 Answer
Instantiate issues 1 Answer
performance question about particles and instantiating 1 Answer
instantiated objects animation making the object reset to 0,0,0?? 1 Answer
How can I destroy many instantiated objects on endless game 1 Answer