From 1fb2ad6f7a8cc5d378fa885f7a93c9b95b5b2b4b Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 5 Jun 2025 11:44:58 +0200 Subject: [PATCH] Added RC_DEBUG consition for Unity --- Unity/DebugConsole.cs | 2 +- Unity/SiteServer.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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() {