فهرست منبع

Fix console support on Unity 4.x

Bepis 4 سال پیش
والد
کامیت
6881fb0bb5
2فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 1 1
      BepInEx/Console/ConsoleManager.cs
  2. 3 0
      BepInEx/Console/Windows/SafeConsole.cs

+ 1 - 1
BepInEx/Console/ConsoleManager.cs

@@ -143,7 +143,7 @@ namespace BepInEx
 				}
 			}
 
-			Console.ForegroundColor = color;
+			SafeConsole.ForegroundColor = color;
 		}
 
 		internal static void SetConsoleStreams()

+ 3 - 0
BepInEx/Console/Windows/SafeConsole.cs

@@ -8,6 +8,9 @@ using System.Reflection;
 
 namespace UnityInjector.ConsoleUtil
 {
+	/// <summary>
+	/// Console class required for Unity 4.x, which do not have ForegroundColor and BackgroundColor properties
+	/// </summary>
 	internal static class SafeConsole
 	{
 		private static GetColorDelegate _getBackgroundColor;