エンジンクラス
InsertService
*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。
概要
方法
ApproveAssetId(assetId: number):() |
ApproveAssetVersionId(assetVersionId: number):() |
CreateMeshPartAsync(meshId: ContentId,collisionFidelity: Enum.CollisionFidelity,renderFidelity: Enum.RenderFidelity):MeshPart |
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} |
GetLatestAssetVersionAsync(assetId: number):number |
GetUserCategories(userId: User):{any} |
GetUserSets(userId: User):{any} |
LoadAssetVersion(assetVersionId: number):Instance |
APIリファレンス
プロパティ
AllowInsertFreeModels
方法
ApproveAssetId
ApproveAssetVersionId
CreateMeshPartAsync
InsertService:CreateMeshPartAsync(
パラメータ
meshId:ContentId |
戻り値
GetBaseCategories
GetBaseSets
GetCollection
GetFreeDecals
GetFreeDecalsAsync
戻り値
コードサンプル
InsertService:GetFreeDecalsAsync
local InsertService = game:GetService("InsertService")
local page = unpack(InsertService:GetFreeDecalsAsync("Cats", 0)) -- "Cats"をページ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
endGetFreeModels
GetFreeModelsAsync
戻り値
コードサンプル
InsertService:GetFreeModelsAsync
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
endGetLatestAssetVersionAsync
GetUserCategories
GetUserSets
Insert
LoadAsset
パラメータ
戻り値
コードサンプル
InsertService:LoadAsset
local InsertService = game:GetService("InsertService")
local ASSET_ID = 82353
-- アセットを読み込む
local asset = InsertService:LoadAsset(ASSET_ID)
-- 読み込んだアセットをワークスペースに親として設定する
asset.Parent = workspaceloadAsset
LoadAssetVersion
パラメータ
戻り値
コードサンプル
InsertService:LoadAssetVersion
local InsertService = game:GetService("InsertService")
local ASSET_VERSION_ID = 296050499
-- アセットを指定のバージョンでロードします
local asset = InsertService:LoadAssetVersion(ASSET_VERSION_ID)
asset.Parent = game.Workspace