From 75347273316a2d4211f48b64e0abe8ac2f59e793 Mon Sep 17 00:00:00 2001 From: Coty Getzelman Date: Wed, 10 Jul 2024 11:21:28 -0700 Subject: [PATCH] Added callback handling for OnSteamExceptionEvent --- SteamManager.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SteamManager.cs b/SteamManager.cs index 3c369e2..99dc379 100644 --- a/SteamManager.cs +++ b/SteamManager.cs @@ -141,6 +141,18 @@ protected virtual void OnEnable() { m_SteamAPIWarningMessageHook = new SteamAPIWarningMessageHook_t(SteamAPIDebugTextHook); SteamClient.SetWarningMessageHook(m_SteamAPIWarningMessageHook); } + + CallbackDispatcher.OnSteamExceptionEvent += OnSteamException; + } + + protected virtual void OnDisable() + { + CallbackDispatcher.OnSteamExceptionEvent -= OnSteamException; + } + + public static void OnSteamException(System.Exception e) + { + Debug.LogException(e); } // OnApplicationQuit gets called too early to shutdown the SteamAPI.