-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Mono build does not have numeric values for enums #420
Comments
No idea how I didn't comment on this yet. Haha. Yeah, all the enums are directly passed from Valve; saved us from having to change those values manually when Valve did; granted that has only happened maybe four times. I know there is an issue with Rust and enums still. We are going to have to cast them specifically in that case. Since I know nothing of how Mono / C# works, I'd have to investigate this further. |
I don't use the .NET/Mono builds so I can't verify this is the case, but as I understand the description of the problem, it is that the enum values aren't assigned in C# which means they start at the default enum value of 0 and count upward instead of matching the values from Valve. Or in other words: Actual Behavior:public enum SteamApiInitResult : long
{
SteamworksActive, // ==> 0
SteamworksFailedToInitialize, // ==> 1
SteamNotRunning, // ==> 2
InvalidAppIDOrAppNotInstalled, // ==> 3
} Expected Behavior:public enum SteamApiInitResult : long
{
SteamworksActive = 1,
SteamworksFailedToInitialize = 2,
SteamNotRunning = 20,
InvalidAppIDOrAppNotInstalled = 79,
} |
Since I know nothing of C# I'm not 100% how to solve the issue. We just pass the enum values from Valve because manually assigning them is very problematic; while they don't typically change those values, they do sometimes. So, my question is, how do we get C# to use the correct values? |
I don't know either. 😅 I think I misunderstood your first response and thought that maybe you misunderstood the OP, so I was trying to add clarifying detail. But it seems it wasn't necessary because you were on the same page as the OP after all. 😁 |
Haha, thank you for clarifying though; I feel like many times I misunderstand things. |
Describe the bug
Enums such as SteamApiInitResult do not have numeric values assigned to the enumvalues, which in this case cause a mismatch when casting the numeric 'status' value of Steam.SteamInit to SteamApiInitResult.
Expected behavior
All enums to contain the correct numeric values. for SteamApiInitResult this would defined as such (as described from the documentation):
Desktop (please complete the following information):
Version of Godot: 4.2.1
Version of GodotSteam: latest
The text was updated successfully, but these errors were encountered: