学习
引擎类
InsertService
无法创建
服务

*此内容使用人工智能(Beta)翻译,可能包含错误。若要查看英文页面,请点按 此处


概要
方法
ApproveAssetId(assetId: number):()
已弃用
ApproveAssetVersionId(assetVersionId: number):()
已弃用
CreateMeshPartAsync(meshId: ContentId,collisionFidelity: Enum.CollisionFidelity,renderFidelity: Enum.RenderFidelity):MeshPart
GetBaseSets():{any}
已弃用
GetCollection(categoryId: number):{any}
已弃用
GetFreeDecals(searchText: string,pageNum: number):{any}
已弃用
GetFreeDecalsAsync(searchText: string,pageNum: number):{any}
GetFreeModels(searchText: string,pageNum: number):{any}
已弃用
GetFreeModelsAsync(searchText: string,pageNum: number):{any}
GetUserCategories(userId: User):{any}
已弃用
GetUserSets(userId: User):{any}
已弃用
Insert(instance: Instance):()
已弃用
loadAsset(assetId: number):Instance
已弃用
继承成员

API 参考
属性
AllowInsertFreeModels
已弃用

方法
ApproveAssetId
已弃用

ApproveAssetVersionId
已弃用

CreateMeshPartAsync
暂停
功能: Basic
InsertService:CreateMeshPartAsync(
meshId:ContentId, collisionFidelity:Enum.CollisionFidelity, renderFidelity:Enum.RenderFidelity
参数
meshId:ContentId
collisionFidelity:Enum.CollisionFidelity
renderFidelity:Enum.RenderFidelity
返回

GetBaseCategories
已弃用

GetBaseSets
已弃用

GetCollection
已弃用

GetFreeDecals
已弃用

GetFreeDecalsAsync
暂停
功能: AssetRead
InsertService:GetFreeDecalsAsync(
searchText:string, pageNum:number
参数
searchText:string
pageNum:number
返回
代码示例
InsertService:GetFreeDecalsAsync
local InsertService = game:GetService("InsertService")
local page = unpack(InsertService:GetFreeDecalsAsync("Cats", 0)) -- 在第 1 页搜索 "Cats"。
for i = 1, page.TotalCount do
local item = page.Results[i]
print("物品 #" .. i)
for key, value in pairs(item) do
print(" " .. key .. ": " .. value)
end
end

GetFreeModels
已弃用

GetFreeModelsAsync
暂停
功能: AssetRead
InsertService:GetFreeModelsAsync(
searchText:string, pageNum:number
参数
searchText:string
pageNum:number
返回
代码示例
插入服务:获取免费模型异步
local InsertService = game:GetService("InsertService")
local page = unpack(InsertService:GetFreeModelsAsync("Cats", 0)) -- 在第 1 页搜索 "Cats"。
for i = 1, page.TotalCount do
local item = page.Results[i]
print("项目 #" .. i)
for key, value in pairs(item) do
print(" " .. key .. ": " .. value)
end
end

GetLatestAssetVersionAsync
暂停
功能: AssetRead
InsertService:GetLatestAssetVersionAsync(assetId:number):number
参数
assetId:number
返回

GetUserCategories
已弃用

GetUserSets
已弃用

Insert
已弃用

LoadAsset
暂停
功能: LoadOwnedAsset
InsertService:LoadAsset(assetId:number):Instance
参数
assetId:number
返回
代码示例
插入服务:加载资产
local InsertService = game:GetService("InsertService")
local ASSET_ID = 82353
-- 加载资产
local asset = InsertService:LoadAsset(ASSET_ID)
asset.Parent = workspace

loadAsset
已弃用

LoadAssetVersion
暂停
功能: LoadOwnedAsset
InsertService:LoadAssetVersion(assetVersionId:number):Instance
参数
assetVersionId:number
返回
代码示例
插入服务:加载资产版本
local InsertService = game:GetService("InsertService")
local ASSET_VERSION_ID = 296050499
local asset = InsertService:LoadAssetVersion(ASSET_VERSION_ID)
asset.Parent = game.Workspace

©2026 Roblox Corporation、Roblox、Roblox 标志及 Powering Imagination 是我们在美国及其他国家或地区的注册与未注册商标。