From 3516422c3f52c8a6ee20877e6f040018cfc544df Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Tue, 7 May 2019 16:28:48 +0100 Subject: [PATCH] UgcEditor.WithPreviewFile --- Facepunch.Steamworks/Structs/UgcEditor.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Facepunch.Steamworks/Structs/UgcEditor.cs b/Facepunch.Steamworks/Structs/UgcEditor.cs index 40c33ac..d59f0c9 100644 --- a/Facepunch.Steamworks/Structs/UgcEditor.cs +++ b/Facepunch.Steamworks/Structs/UgcEditor.cs @@ -47,6 +47,9 @@ internal Editor( WorkshopFileType filetype ) : this() string Language; 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; public Editor WithContent( System.IO.DirectoryInfo t ) { this.ContentFolder = t; return this; } public Editor WithContent( string folderName ) { return WithContent( new System.IO.DirectoryInfo( folderName ) ); } @@ -97,6 +100,7 @@ public async Task SubmitAsync( IProgress progress = null ) if ( MetaData != null ) SteamUGC.Internal.SetItemMetadata( handle, MetaData ); if ( Language != null ) SteamUGC.Internal.SetItemUpdateLanguage( handle, Language ); if ( ContentFolder != null ) SteamUGC.Internal.SetItemContent( handle, ContentFolder.FullName ); + if ( PreviewFile != null ) SteamUGC.Internal.SetItemPreview( handle, PreviewFile ); result.Result = Steamworks.Result.Fail;