Klasa silnika
InsertService
*Ta zawartość została przetłumaczona przy użyciu narzędzi AI (w wersji beta) i może zawierać błędy. Aby wyświetlić tę stronę w języku angielskim, kliknij tutaj.
Podsumowanie
Właściwości
Metody
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 |
Materiały referencyjne dotyczące interfejsów API
Właściwości
AllowInsertFreeModels
Metody
ApproveAssetId
ApproveAssetVersionId
CreateMeshPartAsync
InsertService:CreateMeshPartAsync(
Parametry
meshId:ContentId |
Zwroty
GetBaseCategories
GetBaseSets
GetCollection
GetFreeDecals
GetFreeDecalsAsync
Zwroty
Przykłady kodu
InsertService:GetFreeDecalsAsync
local InsertService = game:GetService("InsertService")
local page = unpack(InsertService:GetFreeDecalsAsync("Koty", 0)) -- Szukaj "Koty" na stronie 1.
for i = 1, page.TotalCount do
local item = page.Results[i]
print("Element #" .. i)
for key, value in pairs(item) do
print(" " .. key .. ": " .. value)
end
endGetFreeModels
GetFreeModelsAsync
Zwroty
Przykłady kodu
InsertService:GetFreeModelsAsync
local InsertService = game:GetService("InsertService")
local page = unpack(InsertService:GetFreeModelsAsync("Kotki", 0)) -- Szukaj "Kotki" na stronie 1.
for i = 1, page.TotalCount do
local item = page.Results[i]
print("Przedmiot #" .. i)
for key, value in pairs(item) do
print(" " .. key .. ": " .. value)
end
endGetLatestAssetVersionAsync
GetUserCategories
GetUserSets
Insert
LoadAsset
loadAsset
LoadAssetVersion
Parametry
Zwroty
Przykłady kodu
InsertService:LoadAssetVersion
local InsertService = game:GetService("InsertService")
local ASSET_VERSION_ID = 296050499
-- Ładowanie wersji zasobu
local asset = InsertService:LoadAssetVersion(ASSET_VERSION_ID)
asset.Parent = game.Workspace