|
@@ -24,13 +24,9 @@ namespace KairoEngine.SteamIntegration
|
|
|
public static bool hasInitialized = false;
|
|
|
private string playerName;
|
|
|
|
|
|
- private void OnDestroy()
|
|
|
- {
|
|
|
- stats.Stop();
|
|
|
- achievements.Stop();
|
|
|
- Steamworks.SteamClient.Shutdown();
|
|
|
- hasInitialized = false;
|
|
|
- }
|
|
|
+ private void OnDestroy() => StopSteamworks();
|
|
|
+ private void OnApplicationQuit() => StopSteamworks();
|
|
|
+ private void OnDisable() => StopSteamworks();
|
|
|
|
|
|
|
|
|
private void Start()
|
|
@@ -60,6 +56,19 @@ namespace KairoEngine.SteamIntegration
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ void Update()
|
|
|
+ {
|
|
|
+ Steamworks.SteamClient.RunCallbacks();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void StopSteamworks()
|
|
|
+ {
|
|
|
+ stats.Stop();
|
|
|
+ achievements.Stop();
|
|
|
+ Steamworks.SteamClient.Shutdown();
|
|
|
+ hasInitialized = false;
|
|
|
+ }
|
|
|
+
|
|
|
public static bool HasInitialized()
|
|
|
{
|
|
|
if(hasInitialized == false)
|