steam_ugc_subscribe_item

语法:

steam_ugc_subscribe_item(published_file_id);


参数 描述
published_file_id The unique file ID for the UGC to subscribe to.


Returns: Async ID


描述

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:

  1. "id" - 触发事件的函数返回的异步 ID

  2. "result" - 操作的结果(实际值)。这将是 GML 常量 ugc_result_success 或其他一些实数。So you should check for this constant to ensure that the call was successful, and if otherwise somthing has not worked correctly. 返回的其余可能值显示为 Steam “EResult” 值的结果,你应该在 SDK 头文件 steamclientpublic.h 中看到所有 89 个可能值。

  3. "event_type" - The string "ugc_subscribe_item".

  4. "published_file_id" - The unique ID for the published item.


例如:

steam_sub = steam_ugc_subscribe_item(global.pubFileID);

The above code will subscribe (and download) the item with the file ID stored in the global variable "pubFileID".