AvatarCreationService

사용되지 않는 항목 표시

*이 콘텐츠는 AI(베타)를 사용해 번역되었으며, 오류가 있을 수 있습니다. 이 페이지를 영어로 보려면 여기를 클릭하세요.

만들 수 없음
서비스

AvatarCreationService는 경험 내에서 아바타 생성을 유도하는 메서드를 제공하는 개발자 아바타 크리에이터를 지원하는 서비스입니다.

요약

메서드

속성

메서드

GetValidationRules


반환

GenerateAvatar2DPreviewAsync

생성

매개 변수

avatarGeneration2dPreviewParams: Dictionary
기본값: ""

반환

GetBatchTokenDetailsAsync

생성

매개 변수

tokenIds: Array
기본값: ""

반환

LoadAvatar2DPreviewAsync

생성

매개 변수

previewId: string
기본값: ""

반환

LoadGeneratedAvatarAsync

생성

매개 변수

generationId: string
기본값: ""

반환

PrepareAvatarForPreviewAsync

()
생성

매개 변수

humanoidModel: Model
기본값: ""

반환

()

PromptCreateAvatarAsync

생성

매개 변수

tokenId: string
기본값: ""
player: Player
기본값: ""
humanoidDescription: HumanoidDescription
기본값: ""

반환

코드 샘플

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

생성

매개 변수

player: Player
기본값: ""
accessory: Instance
기본값: ""
accessoryType: Enum.AccessoryType
기본값: ""

반환

ValidateUGCBodyPartAsync

생성

매개 변수

player: Player
기본값: ""
instance: Instance
기본값: ""
bodyPart: Enum.BodyPart
기본값: ""

반환

ValidateUGCFullBodyAsync

생성

매개 변수

player: Player
기본값: ""
humanoidDescription: HumanoidDescription
기본값: ""

반환

이벤트

AvatarModerationCompleted

매개 변수

outfitId: number
moderationStatus: Enum.ModerationStatus