CatalogSearchParams 數據類型儲存目錄搜索的參數通過 AvatarEditorService:SearchCatalog() 。
當存取 CatalogSearchParams.BundleTypes 或 CatalogSearchParams.AssetTypes 屬性值時,返回的表將被設為只讀,以避免在不直接存取 CatalogSearchParams 實個體、實例時造成混亂。
例如,您可以使用以下屬性:
local params = CatalogSearchParams.new()params.SearchKeyword = "Test"params.MinPrice = 5000params.MaxPrice = 10000params.BundleTypes = {Enum.BundleType.Animations, Enum.BundleType.BodyParts}local types = params.BundleTypesfor _, val in types doprint(val)end-- table.insert(types, Enum.BundleType.Animations) -- This would not work because the table is read only
概要
屬性
用於搜索目錄結果的關鍵字。
要搜尋的最低項目價格。
要搜尋的最高項目價格。
排序結果的順序。
用於總結排序結果的時間期間。
過濾搜索的類別。
銷售類型過濾搜索。
包含 Enum.BundleType 值的陣列,用於過濾搜索。
包含 Enum.AvatarAssetType 值的陣列,用於過濾搜索。
是否應將下架物品包含在結果中。
尋找具有指定創作者名稱的項目。
尋找由指定創作者輸入創建的項目。
尋找由指定創作者ID創建的項目。
指定要傳回回的項目數量。接受 10 , 28 , 30 , 60 和 120 。默認為 30 。
屬性
SortAggregation
用於聚合排序結果的時間期間,由 Enum.CatalogCategoryFilter 代表。此只適用於當排序類型為 Enum.CatalogSortType.MostFavorited 或 Enum.CatalogSortType.BestSelling 時。它不適用於其他類型。
CreatorType
尋找由指定創作者輸入創建的項目。當未指定時,會預設從 Enum.CreatorTypeFilter.User 和 Enum.CreatorTypeFilter.Group 返回創作。搜索由 CatalogSearchParams.CreatorId 與 Enum.CreatorTypeFilter.All 結果導致 HTTP 400 錯誤。