Search Unity

Simple question about Destroy method

Discussion in 'Getting Started' started by monsterrungame, Jul 22, 2020.

  1. monsterrungame

    monsterrungame

    Joined:
    Sep 27, 2019
    Posts:
    15
    Hi,
    did Destroy method should remove the object from the Hierarchy window? My GameObject Transform is still there after destroying everything from it.
     
  2. monsterrungame

    monsterrungame

    Joined:
    Sep 27, 2019
    Posts:
    15
    Sorry guys, I forgot to Destroy gameObject too. Thread can be closed.
     
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Usually if you want to destroy a GameObject and all its children and components, you simply destroy the main GameObject. When you do so, everything else gets destroyed as well.