From 22dda179a30e47c7a7a0a3d0f647bca3d1e754b4 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Fri, 20 Jul 2018 12:02:18 +0100 Subject: [PATCH] Complain if WorkshopUploadAppId not set --- Facepunch.Steamworks/Interfaces/Workshop.Editor.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Facepunch.Steamworks/Interfaces/Workshop.Editor.cs b/Facepunch.Steamworks/Interfaces/Workshop.Editor.cs index 86525be..05fd95e 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.Editor.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.Editor.cs @@ -112,6 +112,9 @@ private void StartCreatingItem() if ( !Type.HasValue ) throw new System.Exception( "Editor.Type must be set when creating a new item!" ); + if ( WorkshopUploadAppId == 0 ) + throw new Exception( "WorkshopUploadAppId should not be 0" ); + CreateItem = workshop.ugc.CreateItem( WorkshopUploadAppId, (SteamNative.WorkshopFileType)(uint)Type, OnItemCreated ); } @@ -137,6 +140,9 @@ private void OnItemCreated( SteamNative.CreateItemResult_t obj, bool Failed ) private void PublishChanges() { + if ( WorkshopUploadAppId == 0 ) + throw new Exception( "WorkshopUploadAppId should not be 0" ); + UpdateHandle = workshop.ugc.StartItemUpdate(WorkshopUploadAppId, Id ); if ( Title != null )