Apprendre
Classe de moteur
AvatarEditorService
Création impossible
Service

*Ce contenu est traduit en utilisant l'IA (Beta) et peut contenir des erreurs. Pour consulter cette page en anglais, clique ici.


Résumé
Méthodes
GetBatchItemDetails(itemIds: {any},itemType: Enum.AvatarItemType):{any}
Déprécié
GetFavorite(itemId: number,itemType: Enum.AvatarItemType):boolean
Déprécié
GetInventory(assetTypes: {any}):InventoryPages
Déprécié
GetItemDetails(itemId: number,itemType: Enum.AvatarItemType):Dictionary
Déprécié
GetOutfitDetails(outfitId: number):Dictionary
Déprécié
GetOutfits(outfitSource: Enum.OutfitSource,outfitType: Enum.OutfitType):OutfitPages
Déprécié
GetRecommendedAssets(assetType: Enum.AvatarAssetType,contextAssetId: number):{any}
Déprécié
GetRecommendedBundles(bundleId: number):{any}
Déprécié
PromptCreateOutfit(outfit: HumanoidDescription,rigType: Enum.HumanoidRigType,outfitOptions: Dictionary,outfitType: Variant):()
PromptSetFavorite(itemId: number,itemType: Enum.AvatarItemType,shouldFavorite: boolean):()
SearchCatalog(searchParameters: CatalogSearchParams):CatalogPages
Déprécié
Membres hérités

Référence API
Méthodes
CheckApplyDefaultClothing
Déprécié

CheckApplyDefaultClothingAsync
Rendement
Capacités : AvatarAppearance
AvatarEditorService:CheckApplyDefaultClothingAsync(humanoidDescription:HumanoidDescription):HumanoidDescription
Paramètres
humanoidDescription:HumanoidDescription

ConformToAvatarRules
Déprécié

ConformToAvatarRulesAsync
Rendement
Capacités : AvatarAppearance
AvatarEditorService:ConformToAvatarRulesAsync(humanoidDescription:HumanoidDescription):HumanoidDescription
Paramètres
humanoidDescription:HumanoidDescription

GetAccessoryType
AvatarEditorService:GetAccessoryType(avatarAssetType:Enum.AvatarAssetType):Enum.AccessoryType
Paramètres
avatarAssetType:Enum.AvatarAssetType

GetAvatarRules
Déprécié

GetAvatarRulesAsync
Rendement
AvatarEditorService:GetAvatarRulesAsync():Dictionary
Retours

GetBatchItemDetails
Déprécié

GetBatchItemDetailsAsync
Rendement
Capacités : AssetRead
AvatarEditorService:GetBatchItemDetailsAsync(
itemIds:{any}, itemType:Enum.AvatarItemType
Paramètres
itemIds:{any}
Retours

GetBundlesByAssetIdAsync
Rendement
Capacités : AssetRead
AvatarEditorService:GetBundlesByAssetIdAsync(
assetId:number, limit:number
Paramètres
assetId:number
limit:number
Valeur par défaut : 10

GetFavorite
Déprécié

GetFavoriteAsync
Rendement
Capacités : Players, AssetRead
AvatarEditorService:GetFavoriteAsync(
itemId:number, itemType:Enum.AvatarItemType
Paramètres
itemId:number
Retours

GetHeadShapesAsync
Rendement
Capacités : Players, AssetRead
AvatarEditorService:GetHeadShapesAsync():{any}
Retours
Échantillons de code
Obtention des formes de tête possédées
TEST
local AvatarEditorService = game:GetService("AvatarEditorService")
AvatarEditorService:PromptAllowInventoryReadAccess()
local result = AvatarEditorService.PromptAllowInventoryReadAccessCompleted:Wait()
if result == Enum.AvatarPromptResult.Success then
local shapes = AvatarEditorService:GetHeadShapesAsync()
for i, shape in ipairs(shapes) do
print(i, shape)
end
end

GetInventory
Déprécié

GetInventoryAsync
Rendement
Capacités : Players, AssetRead
AvatarEditorService:GetInventoryAsync(assetTypes:{any}):InventoryPages
Paramètres
assetTypes:{any}
Échantillons de code
Recherche d'articles expirants
local AvatarEditorService = game:GetService("AvatarEditorService")
local pages = AvatarEditorService:GetInventoryAsync({ Enum.AvatarAssetType.Hat })
local currentPage = pages:GetCurrentPage()
for _, item in currentPage do
if item.ExpirationTime then
local secondsLeft = item.ExpirationTime.UnixTimestamp - DateTime.now().UnixTimestamp
local hoursLeft = math.floor(secondsLeft / 3600)
if hoursLeft < 24 then
warn(string.format("%s expire dans %d heures", item.Name, hoursLeft))
end
end
end

GetItemDetails
Déprécié

GetItemDetailsAsync
Rendement
Capacités : AssetRead
AvatarEditorService:GetItemDetailsAsync(
itemId:number, itemType:Enum.AvatarItemType
Paramètres
itemId:number
Retours
Échantillons de code
Vérification de l'expiration des articles
local AvatarEditorService = game:GetService("AvatarEditorService")
local details = AvatarEditorService:GetItemDetailsAsync(105589844216517, Enum.AvatarItemType.Asset)
if details.ExpirationTime then
local secondsLeft = details.ExpirationTime.UnixTimestamp - DateTime.now().UnixTimestamp
local hoursLeft = math.floor(secondsLeft / 3600)
if hoursLeft < 24 then
warn(details.Name .. " expire dans moins de 24 heures !")
end
end

GetOutfitDetails
Déprécié

GetOutfitDetailsAsync
Rendement
Capacités : AssetRead
AvatarEditorService:GetOutfitDetailsAsync(outfitId:number):Dictionary
Paramètres
outfitId:number
Retours

GetOutfits
Déprécié

GetOutfitsAsync
Rendement
Capacités : Players, AssetRead
AvatarEditorService:GetOutfitsAsync(
outfitSource:Enum.OutfitSource, outfitType:Enum.OutfitType
Paramètres
outfitSource:Enum.OutfitSource
Valeur par défaut : "All"
outfitType:Enum.OutfitType
Valeur par défaut : "All"

GetRecommendedAssets
Déprécié

GetRecommendedAssetsAsync
Rendement
Capacités : AssetRead
AvatarEditorService:GetRecommendedAssetsAsync(
assetType:Enum.AvatarAssetType, contextAssetId:number
Paramètres
contextAssetId:number
Valeur par défaut : 0
Retours
Échantillons de code
Obtenir une recommandation de chapeau
local AvatarEditorService = game:GetService("AvatarEditorService")
local assets = AvatarEditorService:GetRecommendedAssetsAsync(Enum.AvatarAssetType.Hat, 9255093)
for _, asset in ipairs(assets) do
print(asset.Item.Name)
end

GetRecommendedBundles
Déprécié

GetRecommendedBundlesAsync
Rendement
Capacités : AssetRead
AvatarEditorService:GetRecommendedBundlesAsync(bundleId:number):{any}
Paramètres
bundleId:number
Retours

PromptAllowInventoryReadAccess
Capacités : Players, AssetRead
AvatarEditorService:PromptAllowInventoryReadAccess():()
Retours
()

PromptCreateOutfit
Capacités : Players, PlatformAvatarEditing
AvatarEditorService:PromptCreateOutfit(
outfit:HumanoidDescription, rigType:Enum.HumanoidRigType, outfitOptions:Dictionary, outfitType:Variant
):()
Paramètres
outfitOptions:Dictionary
Valeur par défaut : "nil"
outfitType:Variant
Retours
()

PromptDeleteOutfit
Capacités : Players, PlatformAvatarEditing
AvatarEditorService:PromptDeleteOutfit(outfitId:number):()
Paramètres
outfitId:number
Retours
()

PromptRenameOutfit
Capacités : Players, PlatformAvatarEditing
AvatarEditorService:PromptRenameOutfit(outfitId:number):()
Paramètres
outfitId:number
Retours
()

PromptSaveAvatar
Capacités : Players, PlatformAvatarEditing
AvatarEditorService:PromptSaveAvatar(
humanoidDescription:HumanoidDescription, rigType:Enum.HumanoidRigType
):()
Paramètres
humanoidDescription:HumanoidDescription
Retours
()

PromptSetFavorite
Capacités : Players, PlatformAvatarEditing
AvatarEditorService:PromptSetFavorite(
itemId:number, itemType:Enum.AvatarItemType, shouldFavorite:boolean
):()
Paramètres
itemId:number
shouldFavorite:boolean
Retours
()

PromptUpdateOutfit
Capacités : Players, PlatformAvatarEditing
AvatarEditorService:PromptUpdateOutfit(
outfitId:number, updatedOutfit:HumanoidDescription, rigType:Enum.HumanoidRigType
):()
Paramètres
outfitId:number
updatedOutfit:HumanoidDescription
Retours
()

SearchCatalog
Déprécié

SearchCatalogAsync
Rendement
Capacités : AssetRead
AvatarEditorService:SearchCatalogAsync(searchParameters:CatalogSearchParams):CatalogPages
Paramètres
searchParameters:CatalogSearchParams
Échantillons de code
Recherche d'articles avec des options de temps
local AvatarEditorService = game:GetService("AvatarEditorService")
local params = CatalogSearchParams.new()
params.SalesTypeFilter = Enum.SalesTypeFilter.TimedOptions
params.Limit = 10
local pages = AvatarEditorService:SearchCatalogAsync(params)
local results = pages:GetCurrentPage()
for _, item in results do
if item.TimedOptions then
for _, option in item.TimedOptions do
local days = option.Duration / 86400
print(string.format("%s: %d jours pour %d R$", item.Name, days, option.Price))
end
end
end

Événements
PromptAllowInventoryReadAccessCompleted
Capacités : Players, AssetRead
AvatarEditorService.PromptAllowInventoryReadAccessCompleted(result:Enum.AvatarPromptResult):RBXScriptSignal
Paramètres

PromptCreateOutfitCompleted
Capacités : Players, PlatformAvatarEditing
AvatarEditorService.PromptCreateOutfitCompleted(
result:Enum.AvatarPromptResult, failureType:Variant
Paramètres
failureType:Variant

PromptDeleteOutfitCompleted
Capacités : Players, PlatformAvatarEditing
AvatarEditorService.PromptDeleteOutfitCompleted(result:Enum.AvatarPromptResult):RBXScriptSignal
Paramètres

PromptRenameOutfitCompleted
Capacités : Players, PlatformAvatarEditing
AvatarEditorService.PromptRenameOutfitCompleted(result:Enum.AvatarPromptResult):RBXScriptSignal
Paramètres

PromptSaveAvatarCompleted
Capacités : Players, PlatformAvatarEditing
AvatarEditorService.PromptSaveAvatarCompleted(
result:Enum.AvatarPromptResult, humanoidDescription:HumanoidDescription
Paramètres
humanoidDescription:HumanoidDescription

PromptSetFavoriteCompleted
Capacités : Players, PlatformAvatarEditing
AvatarEditorService.PromptSetFavoriteCompleted(result:Enum.AvatarPromptResult):RBXScriptSignal
Paramètres

PromptUpdateOutfitCompleted
Capacités : Players, PlatformAvatarEditing
AvatarEditorService.PromptUpdateOutfitCompleted(result:Enum.AvatarPromptResult):RBXScriptSignal
Paramètres

©2026 Société Roblox. Roblox, le logo Roblox et Powering Imagination font partie de nos marques déposées aux États-Unis et dans d'autres pays.