Skip to content

Conversation

@sandolkakos
Copy link
Contributor

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 RedistInstall class keeps automatically adding the STEAMWORKS_NET define 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:

ProjectSettings/SteamworksNETSettings.json

This file stores the flag value for disabling the automatic STEAMWORKS_NET define symbol. It also serves as a central place to store any other Steamworks.NET-related settings in the future.

  1. The file is created only if you disable the flag at least once
  2. When enabling it again from the disabled state, it will trigger the Domain Reload so the RedistInstall can run and add it automatically again.

This makes it easy to persist and share the configuration across team members and CI setups.

image

@rlabrecque
Copy link
Owner

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
I suspect there's a way to satisfy both of these goals at the same time.
Any thoughts?

@sandolkakos
Copy link
Contributor Author

hey @rlabrecque, I'm happy you like it.
Because all the changes done here are in the Editor folder, this means it would not conflict with #630, which is removing the UnityEngine reference in the Runtime folder (if I undertood it correctly).

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 rlabrecque merged commit 94b7f24 into rlabrecque:master Jul 12, 2025
@sandolkakos sandolkakos deleted the settings-to-disable-the-define-symbols-setter branch July 14, 2025 17:27
@TheCrossBoy
Copy link

TheCrossBoy commented Sep 4, 2025

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants