-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Custom features are not working with OS.has_feature or "Override for" #38747
Comments
Okay, that was a bug that I've been facing since the beginning of my project around 2 months ago. I couldn't think of any workarounds or fixes up until now. Hopefully it gets properly fixed soon - commeting the if/else to get server/client version of my project for n'th time was driving me insane and today I figured out this temp solution. Instead of using custom feature to differentiate between server and client - do it through executable name:
Hope it serves you well for the time being. Cheers! |
Thanks @Luzkan I'll give it a try! |
Any word on a fix? This is a bad blocker for me as Im trying to create a client and server in one project. Can't build either without modifying code between exports |
@systemsoverload I don't think anyone is working on a fix right now, but as a workaround, you could:
|
Another idea: let your build script change constant variables in your .gd file between Exports. Maybe you got a auto-loaded Constants.is_server=true, you can automatically change to false before exporting a client. I'm using a python script to build, deploy and publish my game, and I do this kind of thing to set a version number that both server and client can read and check for. As far as I know, such a game version attribute is badly missing in godot too. You can set version attributes for some exports (not all of them) but you can't read them from code. |
This is another bug actually, see #42978 |
Godot version:
GODOT 3.2.1 - released March 10, 2020
OS/device including version:
Windows 10 Home x64
Issue description:
When trying to export two different build, one for the client and one for the server, the custom features are not working.
If I create a new export template with a custom feature server_build, neither the Override for nor the OS.has_feature seem to be working.
I already saw this issue for the override and this other one for the OS access, but I can't get it working. I just downloaded the latest version of the engine with no success.
Steps to reproduce:
Minimal reproduction project:
custom_feature_bug.zip
The text was updated successfully, but these errors were encountered: