Search Unity

How to disappear game object what I don't want to see?

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

  1. huseyinbaba58

    huseyinbaba58

    Joined:
    Feb 12, 2020
    Posts:
    146
    I moved a game object to hierarchy section.But I want to that game object is invisible.How can I obtain it?
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Do you want it invisible in the game, in the editor, or both?
     
  3. huseyinbaba58

    huseyinbaba58

    Joined:
    Feb 12, 2020
    Posts:
    146
    Just When game run, game object has to be invisible
     
  4. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Disable or remove the Renderer component from the object.
     
  5. huseyinbaba58

    huseyinbaba58

    Joined:
    Feb 12, 2020
    Posts:
    146
    I tried it but when I fire ,game object has to be visible.
     
  6. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Then enable the renderer when you fire?
     
  7. huseyinbaba58

    huseyinbaba58

    Joined:
    Feb 12, 2020
    Posts:
    146
    Thanks