| | |
| | | DontDestroyOnLoad(this); |
| | | Application.logMessageReceived += (string condition, string stackTrace, LogType type) => |
| | | { |
| | | m_logEntries.Add(string.Format("{0}\n{1}", condition, stackTrace)); |
| | | if (type == LogType.Error) |
| | | { |
| | | m_logEntries.Add(string.Format("{0}\n{1}", condition, stackTrace)); |
| | | m_IsVisible = true; |
| | | } |
| | | }; |
| | | } |
| | | |
| | |
| | | |
| | | private void OnGUI() |
| | | { |
| | | GUILayout.BeginArea(new Rect(5, 460, 150, 300)); |
| | | GUILayout.BeginArea(new Rect(5, 330, 150, 300)); |
| | | if (GUILayout.Button("Debug", GUILayout.Width(150), GUILayout.Height(70))) |
| | | m_IsVisible = !m_IsVisible; |
| | | GUILayout.EndArea(); |