At some point in the recent past Unity added this option to the Build Settings menu.
The [manual][1] states:
"Build the Player for server use and with no visual elements (headless) without the need for any command line options. When enabled, Unity builds managed scripts with the UNITY_SERVER define, which enables you to write server-specific code for your applications. **You can also build to the Windows version as a console app so that stdin and stdout are accessible (Unity logs go to stdout by default).**"
(emphasis mine)
There does not seem to be any information available on how how to access the **stdin** stream from the console within Unity scripts.
How is this achieved?
[1]: https://docs.unity3d.com/Manual/BuildSettings.html
↧