From acd27fb9b049db0afde3594a383cc92000fd03ee Mon Sep 17 00:00:00 2001 From: Marllon Vilano Date: Wed, 27 Nov 2024 13:03:32 -0300 Subject: [PATCH 1/2] Avoid adding the STEAMWORKS_NET define symbol to non-standalone platorms --- .../Editor/RedistInstall.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/com.rlabrecque.steamworks.net/Editor/RedistInstall.cs b/com.rlabrecque.steamworks.net/Editor/RedistInstall.cs index 8e02ecec..32e4379b 100644 --- a/com.rlabrecque.steamworks.net/Editor/RedistInstall.cs +++ b/com.rlabrecque.steamworks.net/Editor/RedistInstall.cs @@ -2,6 +2,10 @@ // Copyright (c) 2013-2022 Riley Labrecque // Please see the included LICENSE.txt for additional information. +#if !(UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX || STEAMWORKS_WIN || STEAMWORKS_LIN_OSX) +#define DISABLESTEAMWORKS +#endif + using UnityEngine; using UnityEditor; using System.IO; @@ -58,9 +62,13 @@ static void CheckForOldDlls() { static void AddDefineSymbols() { string currentDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); - HashSet defines = new HashSet(currentDefines.Split(';')) { - "STEAMWORKS_NET" - }; + HashSet defines = new HashSet(currentDefines.Split(';')); + +#if DISABLESTEAMWORKS + defines.Remove("STEAMWORKS_NET"); +#else + defines.Add("STEAMWORKS_NET"); +#endif string newDefines = string.Join(";", defines); if (newDefines != currentDefines) { From ef0b146ce50b353c60ffcde17175bcecb09c2391 Mon Sep 17 00:00:00 2001 From: Marllon Vilano Date: Wed, 27 Nov 2024 13:21:23 -0300 Subject: [PATCH 2/2] Fix identation --- com.rlabrecque.steamworks.net/Editor/RedistInstall.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.rlabrecque.steamworks.net/Editor/RedistInstall.cs b/com.rlabrecque.steamworks.net/Editor/RedistInstall.cs index ca629792..14f10d0b 100644 --- a/com.rlabrecque.steamworks.net/Editor/RedistInstall.cs +++ b/com.rlabrecque.steamworks.net/Editor/RedistInstall.cs @@ -77,7 +77,7 @@ static void AddDefineSymbols() #if DISABLESTEAMWORKS defines.Remove("STEAMWORKS_NET"); #else - defines.Add("STEAMWORKS_NET"); + defines.Add("STEAMWORKS_NET"); #endif string newDefines = string.Join(";", defines);