From 4997a74d157a090146bc21469a1c70d4de763f10 Mon Sep 17 00:00:00 2001 From: Alex Mein Date: Wed, 16 Oct 2019 16:02:01 +0100 Subject: [PATCH] Added public methods for playtime tracking --- Facepunch.Steamworks/SteamUgc.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Facepunch.Steamworks/SteamUgc.cs b/Facepunch.Steamworks/SteamUgc.cs index a2f377d..a329954 100644 --- a/Facepunch.Steamworks/SteamUgc.cs +++ b/Facepunch.Steamworks/SteamUgc.cs @@ -64,5 +64,23 @@ namespace Steamworks return item; } + + public static async Task StartPlaytimeTracking(PublishedFileId fileId) + { + var result = await Internal.StartPlaytimeTracking(new[] {fileId}, 1); + return result.Value.Result == Result.OK; + } + + public static async Task StopPlaytimeTracking(PublishedFileId fileId) + { + var result = await Internal.StopPlaytimeTracking(new[] {fileId}, 1); + return result.Value.Result == Result.OK; + } + + public static async Task StopPlaytimeTrackingForAllItems() + { + var result = await Internal.StopPlaytimeTrackingForAllItems(); + return result.Value.Result == Result.OK; + } } -} \ No newline at end of file +}