Search Unity

How do I write to a systems console from unity

Discussion in 'Scripting' started by Hades98, Aug 19, 2019.

  1. Hades98

    Hades98

    Joined:
    Feb 28, 2018
    Posts:
    1
    So I want to open a cmd from unity and then output strings to it. I am able to open the console using a process.Start() but i can't find a way to something like console.WriteLine(). any help would be good. thanks
     
  2. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    Proces.Start returns you an instance of process class connected to started process. It has streams for stdio you can read and write. This is windows only feature. Idk if it will or wont work on macos/linux (maybe since there are consoles and processes too) but expect it won't work on mobiles and consoles.
     
  3. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Not sure what your intent is, but you can also use Debug.Log to write to the Unity console, and to the device logs.
     
    Deleted User likes this.