Steamworks.SteamUserStats.StoreStats C# (CSharp) Méthode

StoreStats() public static méthode

Store the current data on the server, will get a callback when set

And one callback for every new achievement

If the callback has a result of k_EResultInvalidParam, one or more stats

uploaded has been rejected, either because they broke constraints

or were out of date. In this case the server sends back updated values.

The stats should be re-iterated to keep in sync.

public static StoreStats ( ) : bool
Résultat bool
		public static bool StoreStats() {
			InteropHelp.TestIfAvailableClient();
			return NativeMethods.ISteamUserStats_StoreStats();
		}

Usage Example

        public async Task StoreStats()
        {
            var result = Result.NotSettled;

            SteamUserStats.OnUserStatsStored += (r) =>
            {
                result = r;
            };

            SteamUserStats.StoreStats();

            while (result == Result.NotSettled)
            {
                await Task.Delay(10);
            }

            Assert.AreEqual(result, Result.OK);
        }