Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

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.