Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to access destroy objects in unity?

Discussion in 'Scripting' started by huseyinbaba58, Aug 5, 2020.

  1. huseyinbaba58

    huseyinbaba58

    Joined:
    Feb 12, 2020
    Posts:
    146
    I want to access game objects what destroyed.
    I used SetActive method but method didn't be useful.
    I am waiting your advices.
     
  2. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Afaik, once you destroy a game object, it's gone forever.

    If you are using the SetActive method, then just store a reference to the game object somewhere so you will always have access to it.
     
  3. huseyinbaba58

    huseyinbaba58

    Joined:
    Feb 12, 2020
    Posts:
    146
    Thanks mate.