Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Scripting benchmark: Destroy << SetActive (false)

Discussion in '5.4 Beta' started by laurentlavigne, Jun 21, 2016.

  1. laurentlavigne


    Aug 16, 2012
    1000 go.SetActive(false) is about 4x slower than 1000 Destroy(go)
    Is that expected?

    Off course pooling still represent an advantage when the GO have loads of scripts with inits but I wasn't expecting Destroy to be so fast.
  2. ryanbmcm


    Oct 6, 2015
    Just a guess but I believe Destroy just marks an object for being destroyed (unlike DestroyImmediate) so it seems fairly reasonable that doing that would have almost no cost, because it's not actually doing the destroying.