AvatarCreationService

Veraltete anzeigen

*Dieser Inhalt wurde mit KI (Beta) übersetzt und kann Fehler enthalten. Um diese Seite auf Englisch zu sehen, klicke hier.

Nicht erstellbar
Dienst

AvatarCreationService ist ein service, der entwickler-avatar-ersteller unterstützt, indem er methoden bereitstellt, die die aufforderung zur erstellung von avataren aus erlebnissen unterstützen.

Zusammenfassung

Methoden

Eigenschaften

Methoden

GetValidationRules


Rückgaben

GenerateAvatar2DPreviewAsync

Angehalten

Parameter

avatarGeneration2dPreviewParams: Dictionary
Standardwert: ""

Rückgaben

GetBatchTokenDetailsAsync

Angehalten

Parameter

tokenIds: Array
Standardwert: ""

Rückgaben

LoadAvatar2DPreviewAsync

Angehalten

Parameter

previewId: string
Standardwert: ""

Rückgaben

LoadGeneratedAvatarAsync

Angehalten

Parameter

generationId: string
Standardwert: ""

Rückgaben

PrepareAvatarForPreviewAsync

()
Angehalten

Parameter

humanoidModel: Model
Standardwert: ""

Rückgaben

()

PromptCreateAvatarAsync

Angehalten

Parameter

tokenId: string
Standardwert: ""
player: Player
Standardwert: ""
humanoidDescription: HumanoidDescription
Standardwert: ""

Rückgaben

Code-Beispiele

PromptCreateAvatarAsync

local AvatarCreationService = game:GetService("AvatarCreationService")
export type BodyPartInfo = {
bodyPart: Enum.BodyPart,
instance: Instance, --Folder with Created MeshParts
}
export type BodyPartList = { BodyPartInfo }
local function publishAvatar(bodyPartInstances: BodyPartList, player: Player, tokenId: string)
local humanoidDescription = Instance.new("HumanoidDescription")
for _, bodyPartInfo in bodyPartInstances do
local bodyPartDescription = Instance.new("BodyPartDescription")
bodyPartDescription.Instance = bodyPartInfo.instance
bodyPartDescription.BodyPart = bodyPartInfo.bodyPart
bodyPartDescription.Parent = humanoidDescription
end
local pcallSuccess, result, resultMessage = pcall(function()
return AvatarCreationService:PromptCreateAvatarAsync(tokenId, player, humanoidDescription)
end)
if pcallSuccess then
if result == Enum.PromptCreateAvatarResult.Success then
print("Successfully uploaded with BundleId: ", resultMessage)
else
print("Unsuccessfully uploaded with error message:", resultMessage)
end
else
print("Avatar failed to create.")
end
end

ValidateUGCAccessoryAsync

Angehalten

Parameter

player: Player
Standardwert: ""
accessory: Instance
Standardwert: ""
accessoryType: Enum.AccessoryType
Standardwert: ""

Rückgaben

ValidateUGCBodyPartAsync

Angehalten

Parameter

player: Player
Standardwert: ""
instance: Instance
Standardwert: ""
bodyPart: Enum.BodyPart
Standardwert: ""

Rückgaben

ValidateUGCFullBodyAsync

Angehalten

Parameter

player: Player
Standardwert: ""
humanoidDescription: HumanoidDescription
Standardwert: ""

Rückgaben

Events

AvatarModerationCompleted

Parameter

outfitId: number
moderationStatus: Enum.ModerationStatus