21.2 C
New York
Saturday, September 27, 2025

unity – Attempting to replace an merchandise on the Steam Workshop, getting error: k_EResultInvalidParam (no workshop depot discovered)


I am engaged on Steam Workshop integration for my Unity sport’s person created ranges and I exploit Steamworks.NET.

Importing a degree for the primary time works simply fantastic, I exploit this snippet to add my “XYZ.lvl” file:

SteamAPICall_t deal with = SteamRemoteStorage.PublishWorkshopFile(filePath, null, SteamUtils.GetAppID(), workshopTitle, workshopDescription, ERemoteStoragePublishedFileVisibility.k_ERemoteStoragePublishedFileVisibilityPublic, tags, EWorkshopFileType.k_EWorkshopFileTypeCommunity);
RemoteStoragePublishFileResult.Set(deal with);

However when I attempt to replace my very own, simply uploaded degree, I get an error: k_EResultInvalidParam

I exploit this to replace it:

var m_UGCUpdateHandle = SteamUGC.StartItemUpdate(SteamUtils.GetAppID(), publishedFileID);
bool ret = SteamUGC.SetItemContent(m_UGCUpdateHandle, dirPath);
if (ret)
{
    SteamAPICall_t deal with = SteamUGC.SubmitItemUpdate(m_UGCUpdateHandle, "Replace Stage");
    ItemUpdateResult.Set(deal with);
}

If as an alternative of SetItemContent, I need to simply replace the thumbnail with SetItemPreview, all the pieces works fantastic.

So I suppose the issue is with my SetItemContent name.

I attempted passing these paths to it, however the identical error nonetheless occurs:

  • A path to simply created listing which incorporates the brand new “XYZ.lvl” file.

  • A path to the new “XYZ.lvl” file.

  • A path to an empty listing, hoping for a unique error.

The Steamworks documentation says this concerning the error:

k_EResultInvalidParam

  • Both the supplied app ID is invalid or would not match the patron app ID of the merchandise or, you haven’t enabled ISteamUGC for the supplied app ID on the Steam Workshop Configuration App Admin web page.
  • The preview file is smaller than 16 bytes.

Which is unusual as a result of as I mentioned, if as an alternative of SetItemContent I name SetItemPreview, the thumbnail is appropriately uploaded, the API name ends efficiently. So the primary case would not stand: the app ID is sweet.

But when I add additionally a SetItemContent name to the method, the API name fails with InvalidParam. So the second case would not stand as properly, as a result of the thumbnail is appropriate because of the earlier testing: it will be uploaded if I would not name SetItemContent.

I feel that is all I do know. Be at liberty to ask for more information and thanks prematurely for the assistance! 🙂

UPDATE:

The workshop log says that it fails as a result of:

Add workshop merchandise 2539371896 failed (no workshop depot discovered)

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles