UgcEditor.WithPreviewFile

This commit is contained in:
Garry Newman 2019-05-07 16:28:48 +01:00
parent fd320e2848
commit 3516422c3f

View File

@ -47,6 +47,9 @@ internal Editor( WorkshopFileType filetype ) : this()
string Language; string Language;
public Editor InLanguage( string t ) { this.Language = t; return this; } public Editor InLanguage( string t ) { this.Language = t; return this; }
string PreviewFile;
public Editor WithPreviewFile( string t ) { this.PreviewFile = t; return this; }
System.IO.DirectoryInfo ContentFolder; System.IO.DirectoryInfo ContentFolder;
public Editor WithContent( System.IO.DirectoryInfo t ) { this.ContentFolder = t; return this; } public Editor WithContent( System.IO.DirectoryInfo t ) { this.ContentFolder = t; return this; }
public Editor WithContent( string folderName ) { return WithContent( new System.IO.DirectoryInfo( folderName ) ); } public Editor WithContent( string folderName ) { return WithContent( new System.IO.DirectoryInfo( folderName ) ); }
@ -97,6 +100,7 @@ public async Task<PublishResult> SubmitAsync( IProgress<float> progress = null )
if ( MetaData != null ) SteamUGC.Internal.SetItemMetadata( handle, MetaData ); if ( MetaData != null ) SteamUGC.Internal.SetItemMetadata( handle, MetaData );
if ( Language != null ) SteamUGC.Internal.SetItemUpdateLanguage( handle, Language ); if ( Language != null ) SteamUGC.Internal.SetItemUpdateLanguage( handle, Language );
if ( ContentFolder != null ) SteamUGC.Internal.SetItemContent( handle, ContentFolder.FullName ); if ( ContentFolder != null ) SteamUGC.Internal.SetItemContent( handle, ContentFolder.FullName );
if ( PreviewFile != null ) SteamUGC.Internal.SetItemPreview( handle, PreviewFile );
result.Result = Steamworks.Result.Fail; result.Result = Steamworks.Result.Fail;