Classe motore
InsertService
*Questo contenuto è tradotto usando AI (Beta) e potrebbe contenere errori. Per visualizzare questa pagina in inglese, clicca qui.
Sommario
Proprietà
Metodi
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 |
Riferimento API
Proprietà
AllowInsertFreeModels
Metodi
ApproveAssetId
ApproveAssetVersionId
CreateMeshPartAsync
InsertService:CreateMeshPartAsync(
Parametri
meshId:ContentId |
Restituzioni
GetBaseCategories
GetBaseSets
GetCollection
GetFreeDecals
GetFreeDecalsAsync
Restituzioni
Campioni di codice
InsertService:GetFreeDecalsAsync
local InsertService = game:GetService("InsertService")
local page = unpack(InsertService:GetFreeDecalsAsync("Gatti", 0)) -- Cerca per "Gatti" nella Pagina 1.
for i = 1, page.TotalCount do
local item = page.Results[i]
print("Elemento #" .. i)
for key, value in pairs(item) do
print(" " .. key .. ": " .. value)
end
endGetFreeModels
GetFreeModelsAsync
Restituzioni
Campioni di codice
InsertService:GetFreeModelsAsync
local InsertService = game:GetService("InsertService")
local page = unpack(InsertService:GetFreeModelsAsync("Gatti", 0)) -- Cerca "Gatti" nella Pagina 1.
for i = 1, page.TotalCount do
local item = page.Results[i]
print("Elemento #" .. i)
for key, value in pairs(item) do
print(" " .. key .. ": " .. value)
end
endGetLatestAssetVersionAsync
GetUserCategories
GetUserSets
Insert
LoadAsset
loadAsset
LoadAssetVersion
Parametri
Restituzioni
Campioni di codice
InsertService:CaricaVersioneAsset
local InsertService = game:GetService("InsertService")
local ASSET_VERSION_ID = 296050499
local asset = InsertService:LoadAssetVersion(ASSET_VERSION_ID)
asset.Parent = game.Workspace