diff --git a/Unity/DebugConsole.cs b/Unity/DebugConsole.cs index 70b587a..8c77891 100644 --- a/Unity/DebugConsole.cs +++ b/Unity/DebugConsole.cs @@ -1,4 +1,4 @@ -#if UNITY_5_3_OR_NEWER +#if UNITY_5_3_OR_NEWER && RC_DEBUG using System.IO; using System.Text; using UnityEngine; diff --git a/Unity/SiteServer.cs b/Unity/SiteServer.cs index 0034e2e..da5e0bc 100644 --- a/Unity/SiteServer.cs +++ b/Unity/SiteServer.cs @@ -13,14 +13,16 @@ namespace RoboidControl.Unity { //public Queue thingQueue = new(); protected virtual void Awake() { +#if RC_DEBUG Console.SetOut(new UnityLogWriter()); +#endif this.coreParticipant = new RoboidControl.SiteServer(port); } void OnApplicationQuit() { if (site != null) - site.Close(); + site.Close(); } protected override void Update() {