mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 06:38:01 +03:00
UgcItem Downloaded time
This commit is contained in:
parent
886d9995ee
commit
f91eee68a9
@ -77,9 +77,6 @@ namespace Steamworks
|
|||||||
|
|
||||||
progress?.Invoke( 0.0f );
|
progress?.Invoke( 0.0f );
|
||||||
|
|
||||||
if ( Download( fileId, true ) == false )
|
|
||||||
return item.IsInstalled;
|
|
||||||
|
|
||||||
// Steam docs about Download:
|
// Steam docs about Download:
|
||||||
// If the return value is true then register and wait
|
// If the return value is true then register and wait
|
||||||
// for the Callback DownloadItemResult_t before calling
|
// for the Callback DownloadItemResult_t before calling
|
||||||
@ -96,6 +93,9 @@ namespace Steamworks
|
|||||||
onDownloadStarted = r => downloadStarted = true;
|
onDownloadStarted = r => downloadStarted = true;
|
||||||
OnDownloadItemResult += onDownloadStarted;
|
OnDownloadItemResult += onDownloadStarted;
|
||||||
|
|
||||||
|
if ( Download( fileId, true ) == false )
|
||||||
|
return item.IsInstalled;
|
||||||
|
|
||||||
while ( downloadStarted == false )
|
while ( downloadStarted == false )
|
||||||
{
|
{
|
||||||
if ( ct.IsCancellationRequested )
|
if ( ct.IsCancellationRequested )
|
||||||
|
@ -206,6 +206,22 @@ namespace Steamworks.Ugc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Time when the last update was downloaded
|
||||||
|
/// </summary>
|
||||||
|
public DateTime Downloaded
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
ulong size = 0;
|
||||||
|
uint ts = 0;
|
||||||
|
if ( !SteamUGC.Internal.GetItemInstallInfo( Id, ref size, out _, ref ts ) )
|
||||||
|
return default;
|
||||||
|
|
||||||
|
return Epoch.ToDateTime( ts );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If we're downloading our current progress as a delta betwen 0-1
|
/// If we're downloading our current progress as a delta betwen 0-1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user