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

Debug.drawline Now Showing In Game View

Discussion in 'Scripting' started by chrisf112233, Apr 10, 2019.

  1. chrisf112233

    chrisf112233

    Joined:
    Jul 27, 2014
    Posts:
    3
    It will only show them in scene view, has this been changed? Yes Gismos are enabled in game view mode.

    I was watching this video (goto 8:33)

    It works perfectly fine in that video.

    Pages of google results say it should work as long as you have gismos enabled on game view mode. I have every option for gismos turned on. I also read the drawing gismo needs turned on, but that is nowhere in my list of gismos i can enable/disable...

    Code (CSharp):
    1. Debug.DrawLine(new Vector3(216, 216, 0), new Vector3(Input.touches[t].position.x, Input.touches[t].position.y, 0), Color.red,3f);
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,120
    Works for me. A reminder that you need to press the Gizmos button on the Game view tab, not the Scene view tab. They're slightly different. The one on the Scene view tab is just a dropdown from which you can pick things. But the one on the Game view tab is a toggle button. Press it to make sure it's highlighted, and now I can see Debug.DrawLine lines in both the Scene and Game views.
     
  3. chrisf112233

    chrisf112233

    Joined:
    Jul 27, 2014
    Posts:
    3
    yea thats strange. i have made sure to press it in game view tab. i've even closed game view tab, and re-opened it, restarted unity also. i will try it not using unity remote next. thanks for you help, good to know it's still working, just a problem on my end.