Browse Source

Fixed steamdStat not found error

James Peret 2 years ago
parent
commit
92f21570ba
3 changed files with 11 additions and 8 deletions
  1. 5 2
      Readme.md
  2. 5 5
      Runtime/SteamworksStats.cs
  3. 1 1
      package.json

+ 5 - 2
Readme.md

@@ -1,4 +1,4 @@
-# 📦 KairoEngine.SteamIntegration.v0.2.2
+# 📦 KairoEngine.SteamIntegration.v0.2.3
 
 Kairoengine Steam Integration library.
 
@@ -14,7 +14,10 @@ Kairoengine Steam Integration library.
 
 ### 📄Changelog
 
-##### v0.2.0
+##### v0.2.2
+- Fixed steamdStat not found error
+
+##### v0.2.2
 - Added steamStatId to SteamworksStatData
 
 ##### v0.2.0

+ 5 - 5
Runtime/SteamworksStats.cs

@@ -54,7 +54,7 @@ namespace KairoEngine.SteamIntegration
             {
                 if(steamStats.library[i].name == statName || steamStats.library[i].statName == statName) return steamStats.library[i];
             }
-            Debug.LogWarning($"Could not find stat with name \"{statName}\" in SteamStatLibrary");
+            //Debug.LogWarning($"Could not find stat with name \"{statName}\" in SteamStatLibrary");
             return null;
         }
 
@@ -75,8 +75,8 @@ namespace KairoEngine.SteamIntegration
             SteamworksStatData statData = GetSteamStatData(statName);
             if (statData == null) return;
             if (statData.statType != SteamStatType.Integer) return;
-            Steamworks.SteamUserStats.SetStat(statName, newValue);
-            if(Steamworks.SteamUserStats.GetStatInt(statName) != newValue) Debug.LogWarning($"Stat \"{statName}\" does not exist on Steamworks");
+            Steamworks.SteamUserStats.SetStat(statData.statName, newValue);
+            if(Steamworks.SteamUserStats.GetStatInt(statData.statName) != newValue) Debug.LogWarning($"Stat \"{statData.statName}\" does not exist on Steamworks");
             else Steamworks.SteamUserStats.StoreStats();
         }
 
@@ -86,8 +86,8 @@ namespace KairoEngine.SteamIntegration
             SteamworksStatData statData = GetSteamStatData(statName);
             if (statData == null) return;
             if (statData.statType != SteamStatType.Float) return;
-            Steamworks.SteamUserStats.SetStat(statName, newFloatValue);
-            if(Steamworks.SteamUserStats.GetStatFloat(statName) != newFloatValue) Debug.LogWarning($"Stat \"{statName}\" does not exist on Steamworks");
+            Steamworks.SteamUserStats.SetStat(statData.statName, newFloatValue);
+            if(Steamworks.SteamUserStats.GetStatFloat(statData.statName) != newFloatValue) Debug.LogWarning($"Stat \"{statData.statName}\" does not exist on Steamworks");
             else Steamworks.SteamUserStats.StoreStats();
         }
 

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
     "name": "at.kairoscope.kairoengine.steam-integration",
     "displayName": "KairoEngine Steam Integration",
-    "version": "0.2.2",
+    "version": "0.2.3",
     "unity": "2020.3",
     "description": "KairoEngine module for integrating Steamworks services",
     "dependencies": {