Closed Talsidor closed 6 years ago
Does "workshopItem.Error" say anything after the publishing is finished? I remember getting the same problem, when trying to upload before I allowed users to have space/files on steam cloud and enabling "ISteamUGC for file transfer".
workshopItem.Error is just an empty string, even several minutes after Publish was called. I created a coroutine to report upload progress but workshopItem.Progress and workshopItem.BytesUploaded stay at 0 indefinitely. workshopItem.Publishing also stays true indefinitely.
I double-checked the Steam portal for the title but ISteamUGC file transfer and Steam Cloud user data are both set correctly and published.
(Also NeedToAgreeToWorkshopLegal is false and workshopItem.BytesTotal is 0.)
Would anyone be able to paste the code of their working implementation of uploading a workshop item? I still can't get this to upload a non-blank item.
I pulled down the source code and stepped through the code. The issue appears to be that the OnItemCreated callback (registered on Line 113 of Workshop.Editor) simply never gets executed. I'm at a loss as to why this would be.
https://gist.github.com/MollerVictor/c1b8a9c16fce4078aa1f006dbee4dd41
I have had no troubles running this code.
@MollerVictor Thanks. I've made my code practically identical to yours but still no callback. Can I ask if you've used it from inside the Unity editor or only builds? And are you using Facepunch.Steamworks 0.6 or a different version?
I don't use the callback, I checking it every frame.
https://gist.github.com/MollerVictor/d5d7a0440ce946e1b742a049d273be59
Sorry, I meant the callback internal to the API. Steam is not executing the OnItemCreated callback, which I mentioned above seems to be the reason it's not working for me. I'm also checking it every frame.
I spent the last few hours coding up the same functionality using Steamworks.NET, and it works. Facepunch.Steamworks still isn't receiving the OnItemCreated callback from Steam. :frowning_face:
Are you running 64bit or 32bit?
When I call Publish on a workshop item it does show up in Steam, but none of the content travels with it. Here's the code I'm using to submit the item:
Here's a screenshot of an uploaded item, blank name, no image, 0 bytes of data. (You'll also notice it's Hidden when I set visibility above to Public.)![image](https://user-images.githubusercontent.com/2403289/29912742-130c014c-8e76-11e7-97d6-d9826acfd41c.png)
No errors or warnings are thrown, this is using the latest release (0.6). I can also confirm there's a 9.84 KB preview.jpg and 86.3 KB of other data in the folder at the time Publish is called.