Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Debug.Writeline

Discussion in 'VR' started by Almypal, Jul 20, 2017.

  1. Almypal

    Almypal

    Joined:
    Jun 29, 2017
    Posts:
    20
    Hello All,

    I can't seem to find a clear cut answer for this. I have some code that can't run in Unity that I want to debug in VS.

    I would think adding :

    #if !UNITY_EDITOR
    System.Diagnostics.Debug.WriteLine("test")
    #endif

    would work. Unfortunately, it doesn't show up in the VS window.

    Any ideas.

    Thanks
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,706
    Use UnityEngine.Debug.Log instead.
     
  3. Almypal

    Almypal

    Joined:
    Jun 29, 2017
    Posts:
    20
    Doesn't that only show up in the unity?
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,706
    It will show up in VS as well.