- Home /
Question by
Samael_00001 · Aug 21, 2014 at 08:49 AM ·
destroysetactive
Should I use Destroy() or SetActive(false)?
Comment
I'm making a cross-platform game, so less expensive functions is important for me.
I'm making a breakable objects (I'm replacing an object with broken parts and destroying the first object itself and broken parts too a few seconds after)
Best Answer
Answer by Ekta-Mehta-D · Aug 21, 2014 at 09:18 AM
Destroy() will be destroy the object from the scene (hierarchy) . So u cant reuse that object.
and if u want to use that object later on than u can use setActive(false).
For more info : Destroy and SetActive
Thanks.
Should I use SetActive(false) ins$$anonymous$$d of Destroy() even if I'm not going to reuse an object?
if you wont reuse the object just use destroy because if it is in the heirarchy it is taking some memory
Your answer
![](https://koobas.hobune.stream/wayback/20220613161139im_/https://answers.unity.com/themes/thub/images/avi.jpg)