學習
引擎類別
InsertService
無法建立
服務

*此內容是使用 AI(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("貓", 0)) -- 在第 1 頁搜索 "貓"。
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 是我們在美國及其他國家地區的部分註冊與未註冊商標。