Search Unity

object display problem

Discussion in 'Immediate Mode GUI (IMGUI)' started by YeeHoran, Jun 12, 2018.

  1. YeeHoran

    YeeHoran

    Joined:
    Jun 12, 2018
    Posts:
    8
    Dear everyone,

    I create a "samplemenu" script to control the "sampleGame" script to begin performing. As a beginning, I add a "start" button in the samplemenu script,after I click the "start" button, the "sampleGame" script will begin to run. Since I need the "star prefab" as an object to be drawn in the "sampleGame", I add this "star prefab" in the hierarchy, so when I start performing the "samplemenu" script, there always is an "star prefab" displayed on the screen, like the following. But this is dirty, how can I make the "star" not be displayed,please?
    upload_2018-6-12_13-12-28.png
     
  2. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Hi and welcome to the forum.

    This is actually the wrong subforum you posted to (It is about editor extension and the old UI system that is still used in the editor).
    As for your question: If you disable a game object, it is not visible. You can also work with multiple scenes, but I guess that is a bit too advanced right now. I would recommend watching a few tutorials from unity and looking at their sample projects. This will give you a good idea on how a simple loop looks like.
     
  3. YeeHoran

    YeeHoran

    Joined:
    Jun 12, 2018
    Posts:
    8
    Thank you for your reply!