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

Add detailed logs if steam Init fails. #648

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kasimir-spellgarden
Copy link

The new InitEx method is awesome and provides much more data if something breaks. I've changed the method slightly to expose the underlying error that the Steam SDK produces instead of the generic Steamworks.NET error message.

@@ -260,7 +261,10 @@ public static ESteamAPIInitResult InitEx(uint unIP, ushort usGamePort, ushort us
}
else {
initResult = ESteamAPIInitResult.k_ESteamAPIInitResult_FailedGeneric;
OutSteamErrMsg = "[Steamworks.NET] Failed to initialize CSteamAPIContext";
if(!string.IsNullOrEmpty(OutSteamErrMsg))
OutSteamErrMsg = $"[Steamworks.NET] Failed to initialize CSteamAPIContext: {OutSteamErrMsg}";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this ever get hit? If OutSteamErrMsg is not empty, does that not also mean we'll never get into the branch at L256?

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.

2 participants