Add setting to prevent Steamworks.NET from injecting define symbols #712
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.