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

Automatically define DISABLESTEAMWORKS when running on non-Steam platforms #126

Closed
fredsa opened this issue Oct 10, 2016 · 4 comments
Closed

Comments

@fredsa
Copy link

fredsa commented Oct 10, 2016

Thanks for the DISABLESTEAMWORKS define in c303806.

I think it would be nice if DISABLESTEAMWORKS where automatically defined on non-Steam platforms, such as Android/iOS.

Could be as easy as:

#if !UNITY_STANDALONE
  #define DISABLESTEAMWORKS 
#endif
@rlabrecque
Copy link
Owner

rlabrecque commented Oct 10, 2016

So I was about to do this but... the reason why I didn't is that it would remove the symbols from usage elsewhere. I.E. You would need to wrap all steam calls with "#if UNITY_STANDALONE" as well instead of just an if(). Which while it is good practice it would inconvenience a lot of people currently.

Correct me if I'm wrong about that!

@fredsa
Copy link
Author

fredsa commented Oct 20, 2016

I've been thinking about this some more, and realize it probably makes sense to to support both runtime and compile time conditionals.

Perhaps the answer here is to explicitly document how one would remove all Steamworks.NET APIs at compile time, i.e. wherever the docs cover DISABLESTEAMWORKS just include an example like:

#if !UNITY_STANDALONE
  #define DISABLESTEAMWORKS 
#endif

@Chaser324
Copy link

Chaser324 commented Apr 11, 2017

This is a nice idea, but if you're on a large project that spans many different platforms, you should probably already have some sort of build automation solution that can handle conditionally defining DISABLESTEAMWORKS through a call to PlayerSettings.SetScriptingDefineSymbolsForGroup() where it's necessary.

I also fear that trying to modify those defines outside of the context of someone's standard build workflow could cause issues or prove to be kinda pointless. Anyone already using the PlayerSettings.SetScriptingDefineSymbolsForGroup() in their build workflow could end up inadvertently undoing any additions you try to make to those defines.

@fredsa fredsa closed this as completed Apr 11, 2017
@andrewspalato
Copy link

Adding DISABLESTEAMWORKS does not work when added to the scripting define symbols.

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

No branches or pull requests

4 participants