na vissza geci chatgptre mert nem működött... xdd

This commit is contained in:
2025-12-13 23:46:32 +01:00
parent d7718c1dff
commit 5abd025860
5 changed files with 99 additions and 50 deletions

View File

@@ -49,7 +49,7 @@ public class KCMSteamManager : MonoBehaviour {
[AOT.MonoPInvokeCallback(typeof(SteamAPIWarningMessageHook_t))]
protected static void SteamAPIDebugTextHook(int nSeverity, System.Text.StringBuilder pchDebugText) {
Main.helper.Log(pchDebugText.ToString());
Main.Log(pchDebugText.ToString());
}
#if UNITY_2019_3_OR_NEWER
@@ -64,7 +64,7 @@ public class KCMSteamManager : MonoBehaviour {
protected virtual void Awake() {
// Only one instance of SteamManager at a time!
Main.helper.Log("Steam awake");
Main.Log("Steam awake");
if (s_instance != null) {
Destroy(gameObject);
return;
@@ -76,7 +76,7 @@ public class KCMSteamManager : MonoBehaviour {
// The most common case where this happens is when SteamManager gets destroyed because of Application.Quit(),
// and then some Steamworks code in some other OnDestroy gets called afterwards, creating a new SteamManager.
// You should never call Steamworks functions in OnDestroy, always prefer OnDisable if possible.
Main.helper.Log("Tried to Initialize the SteamAPI twice in one session!");
Main.Log("Tried to Initialize the SteamAPI twice in one session!");
return;
}
@@ -85,11 +85,11 @@ public class KCMSteamManager : MonoBehaviour {
DontDestroyOnLoad(gameObject);
if (!Packsize.Test()) {
Main.helper.Log("[Steamworks.NET] Packsize Test returned false, the wrong version of Steamworks.NET is being run in this platform.");
Main.Log("[Steamworks.NET] Packsize Test returned false, the wrong version of Steamworks.NET is being run in this platform.");
}
if (!DllCheck.Test()) {
Main.helper.Log("[Steamworks.NET] DllCheck Test returned false, One or more of the Steamworks binaries seems to be the wrong version.");
Main.Log("[Steamworks.NET] DllCheck Test returned false, One or more of the Steamworks binaries seems to be the wrong version.");
}
try {
@@ -101,12 +101,12 @@ public class KCMSteamManager : MonoBehaviour {
// See the Valve documentation for more information: https://partner.steamgames.com/doc/sdk/api#initialization_and_shutdown
if (SteamAPI.RestartAppIfNecessary((AppId_t)569480)) {
//Application.Quit();
Main.helper.Log("Attempted to restart app");
Main.Log("Attempted to restart app");
return;
}
}
catch (System.DllNotFoundException e) { // We catch this exception here, as it will be the first occurrence of it.
Main.helper.Log("[Steamworks.NET] Could not load [lib]steam_api.dll/so/dylib. It's likely not in the correct location. Refer to the README for more details.\n" + e);
Main.Log("[Steamworks.NET] Could not load [lib]steam_api.dll/so/dylib. It's likely not in the correct location. Refer to the README for more details.\n" + e);
//Application.Quit();
return;
@@ -123,7 +123,7 @@ public class KCMSteamManager : MonoBehaviour {
// https://partner.steamgames.com/doc/sdk/api#initialization_and_shutdown
m_bInitialized = SteamAPI.Init();
if (!m_bInitialized) {
Main.helper.Log("[Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information.");
Main.Log("[Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information.");
return;
}