diff --git a/com.rlabrecque.steamworks.net/Runtime/Steam.cs b/com.rlabrecque.steamworks.net/Runtime/Steam.cs index 4cb90518..58bb7b07 100644 --- a/com.rlabrecque.steamworks.net/Runtime/Steam.cs +++ b/com.rlabrecque.steamworks.net/Runtime/Steam.cs @@ -56,6 +56,7 @@ public static class SteamAPI { // Returns true on success public static ESteamAPIInitResult InitEx(out string OutSteamErrMsg) { + OutSteamErrMsg = ""; InteropHelp.TestIfPlatformSupported(); var pszInternalCheckInterfaceVersions = new System.Text.StringBuilder(); @@ -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}"; + else + OutSteamErrMsg = "[Steamworks.NET] Failed to initialize CSteamAPIContext"; } }