// Update is called once per frame void Update() { if (StdOut != null) { if (StdOut.Length - StdOut.Position > 0) { long maxRead = StdOut.Length - StdOut.Position; byte[] data = new byte[maxRead]; StdOut.Read(data, 0, (int)maxRead); Write(data); } } }