Unstable 1.1.14.0
This commit is contained in:
@@ -15,6 +15,8 @@ namespace Steamworks.Ugc
|
||||
internal bool ReturnsKeyValueTags;
|
||||
internal bool ReturnsDefaultStats;
|
||||
internal bool ReturnsMetadata;
|
||||
internal bool ReturnsChildren;
|
||||
internal bool ReturnsAdditionalPreviews;
|
||||
|
||||
public IEnumerable<Item> Entries
|
||||
{
|
||||
@@ -74,8 +76,36 @@ namespace Steamworks.Ugc
|
||||
}
|
||||
}
|
||||
|
||||
// TODO GetQueryUGCAdditionalPreview
|
||||
// TODO GetQueryUGCChildren
|
||||
uint numChildren = item.details.NumChildren;
|
||||
if ( ReturnsChildren && numChildren > 0 )
|
||||
{
|
||||
var children = new PublishedFileId[numChildren];
|
||||
if ( SteamUGC.Internal.GetQueryUGCChildren( Handle, i, children, numChildren ) )
|
||||
{
|
||||
item.Children = children;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ReturnsAdditionalPreviews )
|
||||
{
|
||||
var previewsCount = SteamUGC.Internal.GetQueryUGCNumAdditionalPreviews( Handle, i );
|
||||
if ( previewsCount > 0 )
|
||||
{
|
||||
item.AdditionalPreviews = new UgcAdditionalPreview[previewsCount];
|
||||
for ( uint j = 0; j < previewsCount; j++ )
|
||||
{
|
||||
string previewUrlOrVideo;
|
||||
string originalFileName; //what is this???
|
||||
ItemPreviewType previewType = default;
|
||||
if ( SteamUGC.Internal.GetQueryUGCAdditionalPreview(
|
||||
Handle, i, j, out previewUrlOrVideo, out originalFileName, ref previewType ) )
|
||||
{
|
||||
item.AdditionalPreviews[j] = new UgcAdditionalPreview(
|
||||
previewUrlOrVideo, originalFileName, previewType );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
yield return item;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user