Quantcast
Channel: Questions in topic: "log"
Viewing all articles
Browse latest Browse all 235

How to redirect System.Console.Write from dll to Debug.Log

$
0
0
What I am currently doing can be summarized as: var stdOut = System.Console.Out; var consoleOut = new StringWriter(); System.Console.SetOut(consoleOut); //.dll call that calls System.Console.Write/WriteLine Debug.Log( consoleOut.ToString()); System.Console.SetOut(stdOut); This works but will only output to the Unity console after all my calls are finished. Is it possible to whenever System.Console.Write is called in the .dll, to output immediately to Unity console?

Viewing all articles
Browse latest Browse all 235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>