Add setting to prevent Steamworks.NET from injecting define symbols#712
Conversation
…ly adding define symbols to the project
|
I love this [and we should have way more settings here!]; though one conflicting 'initiative' we have going is also trying to remove all UnityEngine references. #630 |
|
hey @rlabrecque, I'm happy you like it. And if we want more settings here, that is totally possible. Something I will probably want to do in future is configure when the App should be a PlayTest, Demo or FullGame. But I still have to think about that, if it will be something for this settings menu or in my own SteamManager, that I created using my singleton system. |
|
@rlabrecque it seems like the release was done just before this change was integrated, and this should really be a priority to be integrated - any games that have BOTH a steam and non-steam version will have the scripting defines inserted forcefully, requiring the use of DISABLESTEAMWORKS. is there a plan for a release any time soon? or, ideally, a better schedule for formal releases? having ~a full year of separation between releases means a lot of critical fixes don't make it into a release for a long time especially because resolution will not handle the versions correctly if you try to install targeting a commit, because the version number isn't being changed at all. bumping the version number, even without a "real" release, would make this significantly easier, rather than having to install the source directly |
|
THanks a lot for this! I like to keep by scripting symbols clean and IMO |
Hi everyone! 👋
I just created a simple settings menu and wanted to share it here in case you're interested in merging it.
When building the game for platforms other than Steam (like Epic Games), we don’t want to include the Steamworks.NET SDK. However, the
RedistInstallclass keeps automatically adding theSTEAMWORKS_NETdefine symbol to the project, which makes this tricky.This hasn’t been a big issue in the past, but now that I’m integrating Epic Online Services SDK, I need more flexibility to build for either Steam or Epic. I’m planning to handle that using Unity’s new Build Profiles, which allow me to define platform-specific scripting symbols.
With this new settings option, we can disable the automatic addition of
STEAMWORKS_NET, giving us full control per build profile. For example, I can enable the symbol only in my Steam profile, and everything works smoothly. ✅Let me know what you think!
🔧 How the settings option works
A configuration file is created at:
This file stores the flag value for disabling the automatic
STEAMWORKS_NETdefine symbol. It also serves as a central place to store any other Steamworks.NET-related settings in the future.This makes it easy to persist and share the configuration across team members and CI setups.