Search Unity

Gizmo Drawing

Discussion in 'Scripting' started by MitchStan, Jul 2, 2008.

  1. MitchStan

    MitchStan

    Joined:
    Feb 26, 2007
    Posts:
    568
    Always something new to learn with Unity. This is probably obvious, but I did a search and can't find the answer. Perhaps someone can point me in the right direction.

    I would like to see the gizmos from the scene view show up in the game. In the Unity Script Reference section I came across the following under Debug.DrawLine:

    How do I enable gizmo drawing so that is appears in the game view? Is Gizmos.DrawLine different from Debug.DrawLine?

    Thanks for any clarification.

    Mitch
     
  2. MatthewW

    MatthewW

    Joined:
    Nov 30, 2006
    Posts:
    1,356
    There's a toggle button for Gizmos at the top of the game view:
     

    Attached Files:

  3. MitchStan

    MitchStan

    Joined:
    Feb 26, 2007
    Posts:
    568
    That's what I thought - I have it selected (on), but no Gizmos appear in the game view. Is there something else I need to do?

    Thanks.

    Mitch
     
  4. Deleted User

    Deleted User

    Guest

    Is there anyway to toggle this button by script??

    Thanks so much!
     
  5. L42yB

    L42yB

    Joined:
    Dec 20, 2012
    Posts:
    34
    There are two separate "Gizmo" buttons, one for the scene view and one for the game view. Make sure you have the game view Gizmo button enabled.

    An easy way to test if it is working is to put a light in the scene and then look for it at runtime. The gizmo for the light should be visible in the game at runtime drawing gizmos has been enabled.