public void Init(GameConsoleDatabase database) { System.Console.WriteLine("Dumb console: " + IsDumb()); if (IsDumb()) { m_ReaderThread = new Thread(() => { Thread.CurrentThread.IsBackground = true; while (true) { var read = System.Console.In.Read(buf, 0, buf.Length); if (read > 0) { m_CurrentLine += new string(buf, 0, read); } else { break; } } }); m_ReaderThread.Start(); } System.Console.Clear(); m_CurrentLine = ""; DrawInputline(); }
public void Init(GameConsoleDatabase database) { if (!AttachConsole(0xffffffff)) { if (m_RestoreFocus) { m_ForegroundWindow = GetForegroundWindow(); m_ResetWindowTime = Time.time + 1; } AllocConsole(); } m_PreviousOutput = System.Console.Out; SetConsoleTitle(m_ConsoleTitle); System.Console.Clear(); System.Console.SetOut(new StreamWriter(System.Console.OpenStandardOutput()) { AutoFlush = true }); m_CurrentLine = ""; DrawInputline(); }
public void Init(GameConsoleDatabase database) { _suggestionList.Init(database); _buildIdText.text = Application.version + " (" + Application.unityVersion + ")"; }
public void Init(GameConsoleDatabase database) { }