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 时才适用。它不适用于其他类型。
默认值:Enum.CatalogSortAggregation.AllTime
CreatorType
搜索由给定的创建者输入创建的物品。当未指定时,默认返回来自 Enum.CreatorTypeFilter.User 和 Enum.CreatorTypeFilter.Group 的创作。通过 搜索结果导致 HTTP 400 错误请求。
默认值:Enum.CreatorTypeFilter.All