This function can be used to subscribe to a UGC item. You supply the published file ID and then the function returns a unique async ID value which can be used to check when the subscribed item has been downloaded in the Steam Async event. This event will have the async_load DS map which will be populated with the following key/value pairs:
- "id" - The async ID returned by the function that triggered the event
- "result" - The result of the operation (a real value). This will either be the GML constant ugc_result_success or some other real number. So you should check for this constant to ensure that the call was successful, and if otherwise somthing has not worked correctly. The rest of the possible values returned are shown as the result of the Steam "EResult" value and you should see steamclientpublic.h in the SDK headers for all 89 possible values.
- "event_type" - The string "ugc_subscribe_item".
- "published_file_id" - The unique ID for the published item.
|published_file_id||The unique file ID for the UGC to subscribe to.|
The above code will subscribe (and download) the item with the file ID stored in the global variable "pubFileID".