{ "schemaVersion": 1, "prefabName": "UI_ConfirmDialog", "prefabPath": "Assets/Bundles/UI/Prefab/UI_ConfirmDialog.prefab", "description": "Dialog 层通用确认弹窗(遮罩 + 弹窗底 + 标题/正文 + 取消/确定)。竖屏 1080x1920。运行时按 bindings/events 绑定 Txt_Title/Txt_Message/Btn_Cancel/Btn_Ok。", "canvas": { "canvasScaler": { "referenceResolution": [1080, 1920], "matchWidthOrHeight": 0.5 } }, "assets": { "sprites": { "ui_overlay_dim": "Assets/Bundles/UI/Texture/Common/ui_overlay_dim.png", "ui_panel_popup": "Assets/Bundles/UI/Texture/Common/ui_panel_popup.png", "btn_primary_normal": "Assets/Bundles/UI/Texture/Common/btn_primary_normal.png", "btn_primary_pressed": "Assets/Bundles/UI/Texture/Common/btn_primary_pressed.png", "btn_primary_disabled": "Assets/Bundles/UI/Texture/Common/btn_primary_disabled.png", "btn_secondary_normal": "Assets/Bundles/UI/Texture/Common/btn_secondary_normal.png", "btn_secondary_pressed": "Assets/Bundles/UI/Texture/Common/btn_secondary_pressed.png", "btn_close": "Assets/Bundles/UI/Texture/Common/btn_close.png" } }, "nodes": [ { "name": "UI_ConfirmDialog", "parent": null, "active": true, "rect": { "anchorMin": [0, 0], "anchorMax": [1, 1], "offsetMin": [0, 0], "offsetMax": [0, 0] }, "components": [ { "type": "Canvas", "sortingOrder": 2000 }, { "type": "CanvasScaler", "referenceResolution": [1080, 1920], "matchWidthOrHeight": 0.5 }, { "type": "GraphicRaycaster" } ] }, { "name": "Img_Mask", "parent": "UI_ConfirmDialog", "active": true, "rect": { "anchorMin": [0, 0], "anchorMax": [1, 1], "offsetMin": [0, 0], "offsetMax": [0, 0] }, "components": [ { "type": "Image", "sprite": "ui_overlay_dim", "imageType": "Simple", "raycastTarget": true, "color": "#FFFFFFCC" } ] }, { "name": "Panel", "parent": "Img_Mask", "active": true, "rect": { "anchorMin": [0.5, 0.5], "anchorMax": [0.5, 0.5], "pivot": [0.5, 0.5], "anchoredPosition": [0, 40], "sizeDelta": [860, 520] }, "components": [ { "type": "Image", "sprite": "ui_panel_popup", "imageType": "Sliced", "raycastTarget": true, "color": "#FFFFFFFF" } ] }, { "name": "Btn_Close", "parent": "Panel", "active": true, "rect": { "anchorMin": [1, 1], "anchorMax": [1, 1], "pivot": [1, 1], "anchoredPosition": [-24, -24], "sizeDelta": [72, 72] }, "components": [ { "type": "Image", "sprite": "btn_close", "imageType": "Simple", "raycastTarget": true, "color": "#FFFFFFFF" }, { "type": "Button", "transition": "ColorTint", "onClick": "Confirm.Close" } ] }, { "name": "Txt_Title", "parent": "Panel", "active": true, "rect": { "anchorMin": [0, 1], "anchorMax": [1, 1], "pivot": [0.5, 1], "anchoredPosition": [0, -48], "sizeDelta": [-120, 64] }, "components": [ { "type": "TextMeshProUGUI", "text": "确认", "fontSize": 48, "fontStyle": "Bold", "alignment": "Center", "color": "#5A4632FF", "raycastTarget": false } ] }, { "name": "Txt_Message", "parent": "Panel", "active": true, "rect": { "anchorMin": [0, 0.5], "anchorMax": [1, 0.5], "pivot": [0.5, 0.5], "anchoredPosition": [0, 24], "sizeDelta": [-96, 160] }, "components": [ { "type": "TextMeshProUGUI", "text": "确定要执行该操作吗?", "fontSize": 32, "alignment": "Center", "color": "#33405EFF", "raycastTarget": false } ] }, { "name": "Btn_Cancel", "parent": "Panel", "active": true, "rect": { "anchorMin": [0.5, 0], "anchorMax": [0.5, 0], "pivot": [1, 0], "anchoredPosition": [-24, 40], "sizeDelta": [280, 88] }, "components": [ { "type": "Image", "sprite": "btn_secondary_normal", "imageType": "Sliced", "raycastTarget": true, "color": "#FFFFFFFF" }, { "type": "Button", "transition": "SpriteSwap", "spritePressed": "btn_secondary_pressed", "onClick": "Confirm.Cancel" } ] }, { "name": "Txt_Cancel", "parent": "Btn_Cancel", "active": true, "rect": { "anchorMin": [0, 0], "anchorMax": [1, 1], "offsetMin": [0, 0], "offsetMax": [0, 0] }, "components": [ { "type": "TextMeshProUGUI", "text": "取消", "fontSize": 34, "fontStyle": "Bold", "alignment": "Center", "color": "#F6F8FFFF", "raycastTarget": false }, { "type": "Outline", "effectColor": "#102033AA", "effectDistance": [1, -1] } ] }, { "name": "Btn_Ok", "parent": "Panel", "active": true, "rect": { "anchorMin": [0.5, 0], "anchorMax": [0.5, 0], "pivot": [0, 0], "anchoredPosition": [24, 40], "sizeDelta": [280, 88] }, "components": [ { "type": "Image", "sprite": "btn_primary_normal", "imageType": "Sliced", "raycastTarget": true, "color": "#FFFFFFFF" }, { "type": "Button", "transition": "SpriteSwap", "spritePressed": "btn_primary_pressed", "spriteDisabled": "btn_primary_disabled", "onClick": "Confirm.Ok" } ] }, { "name": "Txt_Ok", "parent": "Btn_Ok", "active": true, "rect": { "anchorMin": [0, 0], "anchorMax": [1, 1], "offsetMin": [0, 0], "offsetMax": [0, 0] }, "components": [ { "type": "TextMeshProUGUI", "text": "确定", "fontSize": 34, "fontStyle": "Bold", "alignment": "Center", "color": "#F6F8FFFF", "raycastTarget": false }, { "type": "Outline", "effectColor": "#102033AA", "effectDistance": [1, -1] } ] } ], "bindings": ["Txt_Title", "Txt_Message", "Btn_Cancel", "Btn_Ok", "Btn_Close"], "events": [ { "name": "Confirm.Ok", "node": "Btn_Ok" }, { "name": "Confirm.Cancel", "node": "Btn_Cancel" }, { "name": "Confirm.Close", "node": "Btn_Close" } ] }