From 92db2bcf064a20d4f9be1246eba30e384819687e Mon Sep 17 00:00:00 2001 From: Kasimir Radtke Date: Tue, 17 Sep 2024 10:36:28 +0100 Subject: [PATCH] Add detailed logs if steam Init fails. --- com.rlabrecque.steamworks.net/Runtime/Steam.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"; } }