概要
道具
| 名稱 | 值 | 概要 |
|---|---|---|
| InvalidName | 1 | |
| OutfitLimitReached | 2 | |
| Other | 3 |
Usage
範例程式碼
處理服裝創建結果
local AvatarEditorService = game:GetService("AvatarEditorService")
AvatarEditorService.PromptCreateOutfitCompleted:Connect(function(result, failureType)
if result == Enum.AvatarPromptResult.Success then
-- 服裝已創建
elseif result == Enum.AvatarPromptResult.PermissionDenied then
-- 用戶拒絕了提示;忽略 failureType
else -- Enum.AvatarPromptResult.Failed
if failureType == Enum.CreateOutfitFailure.OutfitLimitReached then
-- 告訴用戶他們達到了服裝上限
elseif failureType == Enum.CreateOutfitFailure.InvalidName then
-- 告訴用戶選擇不同的名稱
else -- Enum.CreateOutfitFailure.Other
-- 一般失敗;重試或顯示一般錯誤
end
end
end)