Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid adding the STEAMWORKS_NET define symbol to non-standalone platorms #660

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions com.rlabrecque.steamworks.net/Editor/RedistInstall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 UnityEditor.Build;
Expand Down Expand Up @@ -68,10 +72,13 @@ static void AddDefineSymbols()
currentDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);

#endif
defines = new HashSet<string>(currentDefines.Split(';'))
{
"STEAMWORKS_NET"
};
defines = new HashSet<string>(currentDefines.Split(';'));

#if DISABLESTEAMWORKS
defines.Remove("STEAMWORKS_NET");
#else
defines.Add("STEAMWORKS_NET");
#endif

string newDefines = string.Join(";", defines);
if (newDefines != currentDefines)
Expand Down