From 8560d94a1801ac78b01f7bc7a50f87a8285fd7b3 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Tue, 7 May 2019 16:41:18 +0100 Subject: [PATCH] Ugc.Editor visibility --- Facepunch.Steamworks/Structs/UgcEditor.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Facepunch.Steamworks/Structs/UgcEditor.cs b/Facepunch.Steamworks/Structs/UgcEditor.cs index 2a8e5f4..ff8e81d 100644 --- a/Facepunch.Steamworks/Structs/UgcEditor.cs +++ b/Facepunch.Steamworks/Structs/UgcEditor.cs @@ -55,6 +55,11 @@ internal Editor( WorkshopFileType filetype ) : 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 ) ); } + RemoteStoragePublishedFileVisibility? Visibility; + + public Editor WithPublicVisibility() { Visibility = RemoteStoragePublishedFileVisibility.Public; return this; } + public Editor WithFriendsOnlyVisibility() { Visibility = RemoteStoragePublishedFileVisibility.FriendsOnly; return this; } + public Editor WithPrivateVisibility() { Visibility = RemoteStoragePublishedFileVisibility.Private; return this; } List Tags; public Editor WithTag( string tag ) @@ -112,6 +117,7 @@ public async Task SubmitAsync( IProgress progress = null ) 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 ); + if ( Visibility.HasValue ) SteamUGC.Internal.SetItemVisibility( handle, Visibility.Value ); if ( Tags != null && Tags.Count > 0 ) { using ( var a = SteamParamStringArray.From( Tags.ToArray() ) )