diff --git a/cocoscreator_projects/YouleNexus/out/legacy-migration/BackHall_Layer.prefab b/cocoscreator_projects/YouleNexus/out/legacy-migration/BackHall_Layer.prefab new file mode 100644 index 0000000..47920bb --- /dev/null +++ b/cocoscreator_projects/YouleNexus/out/legacy-migration/BackHall_Layer.prefab @@ -0,0 +1,438 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "BackHall_Layer", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "BackHall_Layer", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + }, + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 20 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "group-55", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 12 + }, + { + "__id__": 14 + } + ], + "_prefab": { + "__id__": 15 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Spirit465", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 5 + }, + { + "__id__": 7 + }, + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 10 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 569.5, + "y": 168.5, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "Pda866NWkdQmjRO6KXJuOY" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 91, + "height": 91 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "X9Ol3V2LBqVbnRM6MhOLyz" + }, + { + "__type__": "cc.ProgressBar", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "8e3905be-b629-4c4d-858b-b8a76e9f7752@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_reverse": false, + "_totalLength": 100, + "_progress": 0, + "_barSprite": null, + "_mode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "J3KwtsMdpurmWVjh9Eh7Kp" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 8 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "chxWR5DPKUVCzLlo5XGVvA", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "MDZAGEVNBDRyYrq4pKFhLE" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 11 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1600, + "height": 720 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "jJHgeXr4FQEWQO4XIzOOHh" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 13 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "slVD8fJQaBPa4l52pf5IXq", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ZxNiZBkby9tj7SSbfpOQmU" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 16 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1600, + "height": 720 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "h4SYJyuqRHeM6Xiu5UirLi" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "ur25Y7TU0TKvsIbemih80X", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + } +] \ No newline at end of file diff --git a/cocoscreator_projects/YouleNexus/out/legacy-migration/BackHall_Layer.prefab.diff b/cocoscreator_projects/YouleNexus/out/legacy-migration/BackHall_Layer.prefab.diff new file mode 100644 index 0000000..57d1bce --- /dev/null +++ b/cocoscreator_projects/YouleNexus/out/legacy-migration/BackHall_Layer.prefab.diff @@ -0,0 +1,1244 @@ +--- YouleNexus/assets/framework/ui/prefabs/widgets/Layer619_BackOtherGame.prefab 2026-09-01 01:34:18.571553100 +0800 ++++ YouleNexus\out\legacy-migration\BackHall_Layer.prefab 2026-09-02 08:30:19.504409200 +0800 +@@ -1,7 +1,7 @@ + [ + { + "__type__": "cc.Prefab", +- "_name": "Layer619_BackOtherGame", ++ "_name": "BackHall_Layer", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", +@@ -13,197 +13,35 @@ + }, + { + "__type__": "cc.Node", +- "_name": "Layer619_BackOtherGame", ++ "_name": "BackHall_Layer", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, +- "_children": [ +- { +- "__id__": 2 +- }, +- { +- "__id__": 3 +- }, +- { +- "__id__": 4 +- }, +- { +- "__id__": 5 +- }, +- { +- "__id__": 6 +- } +- ], +- "_active": true, +- "_components": [ +- { +- "__id__": 50 +- } +- ], +- "_prefab": { +- "__id__": 52 +- }, +- "_lpos": { +- "__type__": "cc.Vec3", +- "x": "0", +- "y": "0", +- "z": 0 +- }, +- "_lrot": { +- "__type__": "cc.Quat", +- "x": 0, +- "y": 0, +- "z": 0 +- }, +- "_lscale": { +- "__type__": "cc.Vec3", +- "x": 1, +- "y": 1, +- "z": 1 +- }, +- "_mobility": 0, +- "_layer": 1073741824, +- "_euler": { +- "__type__": "cc.Vec3", +- "x": 0, +- "y": 0, +- "z": 0 +- }, +- "_id": "" +- }, +- { +- "__type__": "cc.Node", +- "_name": "Bg", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "_parent": { +- "__id__": 1 +- }, + "_children": [], + "_active": true, + "_components": [ + { +- "__id__": 7 ++ "__id__": 17 + }, + { +- "__id__": 9 +- }, +- { +- "__id__": 11 +- } +- ], +- "_prefab": { +- "__id__": 13 +- }, +- "_lpos": { +- "__type__": "cc.Vec3", +- "x": "0", +- "y": "0", +- "z": 0 +- }, +- "_lrot": { +- "__type__": "cc.Quat", +- "x": 0, +- "y": 0, +- "z": 0 +- }, +- "_lscale": { +- "__type__": "cc.Vec3", +- "x": 1, +- "y": 1, +- "z": 1 +- }, +- "_mobility": 0, +- "_layer": 1073741824, +- "_euler": { +- "__type__": "cc.Vec3", +- "x": 0, +- "y": 0, +- "z": 0 +- }, +- "_id": "" +- }, +- { +- "__type__": "cc.Node", +- "_name": "Title", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "_parent": { +- "__id__": 1 +- }, +- "_children": [], +- "_active": true, +- "_components": [ +- { +- "__id__": 14 +- }, +- { +- "__id__": 16 ++ "__id__": 19 + } + ], + "_prefab": { +- "__id__": 18 ++ "__id__": 20 + }, + "_lpos": { + "__type__": "cc.Vec3", +- "x": "0", +- "y": "100", +- "z": 0 +- }, +- "_lrot": { +- "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0 + }, +- "_lscale": { +- "__type__": "cc.Vec3", +- "x": 1, +- "y": 1, +- "z": 1 +- }, +- "_mobility": 0, +- "_layer": 1073741824, +- "_euler": { +- "__type__": "cc.Vec3", +- "x": 0, +- "y": 0, +- "z": 0 +- }, +- "_id": "" +- }, +- { +- "__type__": "cc.Node", +- "_name": "Msg", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "_parent": { +- "__id__": 1 +- }, +- "_children": [], +- "_active": true, +- "_components": [ +- { +- "__id__": 19 +- }, +- { +- "__id__": 21 +- } +- ], +- "_prefab": { +- "__id__": 23 +- }, +- "_lpos": { +- "__type__": "cc.Vec3", +- "x": "0", +- "y": "0", +- "z": 0 +- }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, +- "z": 0 ++ "z": 0, ++ "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", +@@ -223,7 +61,7 @@ + }, + { + "__type__": "cc.Node", +- "_name": "CancelBtn", ++ "_name": "group-55", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { +@@ -231,35 +69,33 @@ + }, + "_children": [ + { +- "__id__": 24 ++ "__id__": 3 + } + ], + "_active": true, + "_components": [ + { +- "__id__": 30 ++ "__id__": 12 + }, + { +- "__id__": 32 +- }, +- { +- "__id__": 34 ++ "__id__": 14 + } + ], + "_prefab": { +- "__id__": 36 ++ "__id__": 15 + }, + "_lpos": { + "__type__": "cc.Vec3", +- "x": "-100", +- "y": "-100", ++ "x": 0, ++ "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, +- "z": 0 ++ "z": 0, ++ "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", +@@ -279,43 +115,40 @@ + }, + { + "__type__": "cc.Node", +- "_name": "ConfirmBtn", ++ "_name": "Spirit465", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { +- "__id__": 1 ++ "__id__": 2 + }, +- "_children": [ +- { +- "__id__": 37 +- } +- ], ++ "_children": [], + "_active": true, + "_components": [ + { +- "__id__": 43 ++ "__id__": 5 + }, + { +- "__id__": 45 ++ "__id__": 7 + }, + { +- "__id__": 47 ++ "__id__": 9 + } + ], + "_prefab": { +- "__id__": 49 ++ "__id__": 10 + }, + "_lpos": { + "__type__": "cc.Vec3", +- "x": "100", +- "y": "-100", ++ "x": 569.5, ++ "y": 168.5, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, +- "z": 0 ++ "z": 0, ++ "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", +@@ -334,21 +167,25 @@ + "_id": "" + }, + { ++ "__type__": "cc.CompPrefabInfo", ++ "fileId": "Pda866NWkdQmjRO6KXJuOY" ++ }, ++ { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { +- "__id__": 2 ++ "__id__": 3 + }, + "_enabled": true, + "__prefab": { +- "__id__": 8 ++ "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", +- "width": 40, +- "height": 36 ++ "width": 91, ++ "height": 91 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", +@@ -359,23 +196,19 @@ + }, + { + "__type__": "cc.CompPrefabInfo", +- "fileId": "Nz93+bSWC6Lz1cqasxtq7T" ++ "fileId": "X9Ol3V2LBqVbnRM6MhOLyz" + }, + { +- "__type__": "cc.Sprite", ++ "__type__": "cc.ProgressBar", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { +- "__id__": 2 ++ "__id__": 3 + }, + "_enabled": true, + "__prefab": { +- "__id__": 10 +- }, +- "_spriteFrame": { +- "__uuid__": "dcc4530b-344b-40b6-8fbb-9fa35db6a289@f9941", +- "__expectedType__": "cc.SpriteFrame" ++ "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, +@@ -387,88 +220,24 @@ + "b": 255, + "a": 255 + }, +- "_type": 1, +- "_fillType": 0, +- "_sizeMode": 0, +- "_fillCenter": { +- "__type__": "cc.Vec2", +- "x": 0, +- "y": 0 +- }, +- "_fillStart": 0, +- "_fillRange": 0, +- "_isTrimmedMode": true, +- "_useGrayscale": false, +- "_atlas": null, +- "_id": "" +- }, +- { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "q9OK1cuuLhMXsCknGd2+xM" +- }, +- { +- "__type__": "cc.UIOpacity", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 2 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 12 +- }, +- "opacity": 240, +- "_opacity": 240, +- "_id": "" +- }, +- { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "V9oQSGNqSekPZPOF/aO8ma" +- }, +- { +- "__type__": "cc.PrefabInfo", +- "root": { +- "__id__": 1 +- }, +- "asset": { +- "__id__": 0 +- }, +- "fileId": "9fmZiPLftG1ox2xnFugHsr", +- "instance": null, +- "targetOverrides": null, +- "nestedPrefabInstanceRoots": null +- }, +- { +- "__type__": "cc.UITransform", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 3 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 15 +- }, +- "_contentSize": { +- "__type__": "cc.Size", +- "width": 240, +- "height": 50.4 +- }, +- "_anchorPoint": { +- "__type__": "cc.Vec2", +- "x": 0.5, +- "y": 0.5 ++ "_spriteFrame": { ++ "__uuid__": "8e3905be-b629-4c4d-858b-b8a76e9f7752@f9941", ++ "__expectedType__": "cc.SpriteFrame" + }, ++ "_type": 0, ++ "_reverse": false, ++ "_totalLength": 100, ++ "_progress": 0, ++ "_barSprite": null, ++ "_mode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", +- "fileId": "qSYnT1cR5lVp3mlhpxSvWC" ++ "fileId": "J3KwtsMdpurmWVjh9Eh7Kp" + }, + { +- "__type__": "cc.Label", ++ "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, +@@ -477,32 +246,29 @@ + }, + "_enabled": true, + "__prefab": { +- "__id__": 17 ++ "__id__": 8 + }, +- "_string": "跳转其他游戏", +- "_horizontalAlign": 1, +- "_verticalAlign": 1, +- "_actualFontSize": 40, +- "_fontSize": 40, +- "_fontFamily": "Arial", +- "_lineHeight": 40, +- "_overflow": 0, +- "_enableWrapText": true, +- "_font": null, +- "_isSystemFontUsed": true, +- "_spacingX": 0, +- "_isItalic": false, +- "_isBold": false, +- "_isUnderline": false, +- "_underlineHeight": 2, +- "_cacheMode": 0, ++ "_alignFlags": 45, ++ "_target": null, ++ "_left": 0, ++ "_right": 0, ++ "_top": 0, ++ "_bottom": 0, ++ "_horizontalCenter": 0, ++ "_verticalCenter": 0, ++ "_isAbsLeft": true, ++ "_isAbsRight": true, ++ "_isAbsTop": true, ++ "_isAbsBottom": true, ++ "_isAbsHorizontalCenter": true, ++ "_isAbsVerticalCenter": true, ++ "_originalWidth": 0, ++ "_originalHeight": 0, ++ "_alignMode": 2, ++ "_lockFlags": 0, + "_id": "" + }, + { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "dLQQuvzROW1P+Bbfpuxp84" +- }, +- { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 +@@ -510,135 +276,14 @@ + "asset": { + "__id__": 0 + }, +- "fileId": "42TmR4jo5Ku4x5qSH0hBQE", ++ "fileId": "chxWR5DPKUVCzLlo5XGVvA", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { +- "__type__": "cc.UITransform", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 4 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 20 +- }, +- "_contentSize": { +- "__type__": "cc.Size", +- "width": 342.24609375, +- "height": 50.4 +- }, +- "_anchorPoint": { +- "__type__": "cc.Vec2", +- "x": 0.5, +- "y": 0.5 +- }, +- "_id": "" +- }, +- { + "__type__": "cc.CompPrefabInfo", +- "fileId": "lViSWbkhQW7FrNEgPb91+e" +- }, +- { +- "__type__": "cc.Label", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 4 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 22 +- }, +- "_string": "是否跳转到斗地主?", +- "_horizontalAlign": 1, +- "_verticalAlign": 1, +- "_actualFontSize": 40, +- "_fontSize": 40, +- "_fontFamily": "Arial", +- "_lineHeight": 40, +- "_overflow": 0, +- "_enableWrapText": true, +- "_font": null, +- "_isSystemFontUsed": true, +- "_spacingX": 0, +- "_isItalic": false, +- "_isBold": false, +- "_isUnderline": false, +- "_underlineHeight": 2, +- "_cacheMode": 0, +- "_id": "" +- }, +- { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "RnzRjzthsZF1LCHo/+d/2E" +- }, +- { +- "__type__": "cc.PrefabInfo", +- "root": { +- "__id__": 1 +- }, +- "asset": { +- "__id__": 0 +- }, +- "fileId": "87NBk+zwxKwp9zZJe1eW4a", +- "instance": null, +- "targetOverrides": null, +- "nestedPrefabInstanceRoots": null +- }, +- { +- "__type__": "cc.Node", +- "_name": "Label", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "_parent": { +- "__id__": 5 +- }, +- "_children": [], +- "_active": true, +- "_components": [ +- { +- "__id__": 25 +- }, +- { +- "__id__": 27 +- } +- ], +- "_prefab": { +- "__id__": 29 +- }, +- "_lpos": { +- "__type__": "cc.Vec3", +- "x": "0", +- "y": "0", +- "z": 0 +- }, +- "_lrot": { +- "__type__": "cc.Quat", +- "x": 0, +- "y": 0, +- "z": 0 +- }, +- "_lscale": { +- "__type__": "cc.Vec3", +- "x": 1, +- "y": 1, +- "z": 1 +- }, +- "_mobility": 0, +- "_layer": 1073741824, +- "_euler": { +- "__type__": "cc.Vec3", +- "x": 0, +- "y": 0, +- "z": 0 +- }, +- "_id": "" ++ "fileId": "MDZAGEVNBDRyYrq4pKFhLE" + }, + { + "__type__": "cc.UITransform", +@@ -646,16 +291,16 @@ + "_objFlags": 0, + "__editorExtras__": {}, + "node": { +- "__id__": 24 ++ "__id__": 2 + }, + "_enabled": true, + "__prefab": { +- "__id__": 26 ++ "__id__": 11 + }, + "_contentSize": { + "__type__": "cc.Size", +- "width": 80, +- "height": 50.4 ++ "width": 1600, ++ "height": 720 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", +@@ -666,44 +311,41 @@ + }, + { + "__type__": "cc.CompPrefabInfo", +- "fileId": "EdM76YkHb7wqTyQDtqhCSO" ++ "fileId": "jJHgeXr4FQEWQO4XIzOOHh" + }, + { +- "__type__": "cc.Label", ++ "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { +- "__id__": 24 ++ "__id__": 2 + }, + "_enabled": true, + "__prefab": { +- "__id__": 28 ++ "__id__": 13 + }, +- "_string": "取消", +- "_horizontalAlign": 1, +- "_verticalAlign": 1, +- "_actualFontSize": 40, +- "_fontSize": 40, +- "_fontFamily": "Arial", +- "_lineHeight": 40, +- "_overflow": 0, +- "_enableWrapText": true, +- "_font": null, +- "_isSystemFontUsed": true, +- "_spacingX": 0, +- "_isItalic": false, +- "_isBold": false, +- "_isUnderline": false, +- "_underlineHeight": 2, +- "_cacheMode": 0, ++ "_alignFlags": 45, ++ "_target": null, ++ "_left": 0, ++ "_right": 0, ++ "_top": 0, ++ "_bottom": 0, ++ "_horizontalCenter": 0, ++ "_verticalCenter": 0, ++ "_isAbsLeft": true, ++ "_isAbsRight": true, ++ "_isAbsTop": true, ++ "_isAbsBottom": true, ++ "_isAbsHorizontalCenter": true, ++ "_isAbsVerticalCenter": true, ++ "_originalWidth": 0, ++ "_originalHeight": 0, ++ "_alignMode": 2, ++ "_lockFlags": 0, + "_id": "" + }, + { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "iQb2S/akTFrCWx6eMOhEZu" +- }, +- { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 +@@ -711,203 +353,14 @@ + "asset": { + "__id__": 0 + }, +- "fileId": "6aSLwJjdJNo4N5tus4cWOO", ++ "fileId": "slVD8fJQaBPa4l52pf5IXq", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { +- "__type__": "cc.UITransform", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 5 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 31 +- }, +- "_contentSize": { +- "__type__": "cc.Size", +- "width": 40, +- "height": 36 +- }, +- "_anchorPoint": { +- "__type__": "cc.Vec2", +- "x": 0.5, +- "y": 0.5 +- }, +- "_id": "" +- }, +- { + "__type__": "cc.CompPrefabInfo", +- "fileId": "4LJiTnsexa+c9Ug9YBpGln" +- }, +- { +- "__type__": "cc.Sprite", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 5 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 33 +- }, +- "_spriteFrame": { +- "__uuid__": "dcc4530b-344b-40b6-8fbb-9fa35db6a289@f9941", +- "__expectedType__": "cc.SpriteFrame" +- }, +- "_customMaterial": null, +- "_srcBlendFactor": 2, +- "_dstBlendFactor": 4, +- "_color": { +- "__type__": "cc.Color", +- "r": 255, +- "g": 255, +- "b": 255, +- "a": 255 +- }, +- "_type": 1, +- "_fillType": 0, +- "_sizeMode": 0, +- "_fillCenter": { +- "__type__": "cc.Vec2", +- "x": 0, +- "y": 0 +- }, +- "_fillStart": 0, +- "_fillRange": 0, +- "_isTrimmedMode": true, +- "_useGrayscale": false, +- "_atlas": null, +- "_id": "" +- }, +- { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "cuT2peV+ddq3jcNzZoVx5l" +- }, +- { +- "__type__": "cc.Button", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 5 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 35 +- }, +- "_interactable": true, +- "_transition": 3, +- "_normalColor": { +- "__type__": "cc.Color", +- "r": 255, +- "g": 255, +- "b": 255, +- "a": 255 +- }, +- "_hoverColor": { +- "__type__": "cc.Color", +- "r": 211, +- "g": 211, +- "b": 211, +- "a": 255 +- }, +- "_pressedColor": { +- "__type__": "cc.Color", +- "r": 255, +- "g": 255, +- "b": 255, +- "a": 255 +- }, +- "_disabledColor": { +- "__type__": "cc.Color", +- "r": 124, +- "g": 124, +- "b": 124, +- "a": 255 +- }, +- "_normalSprite": null, +- "_hoverSprite": null, +- "_pressedSprite": null, +- "_disabledSprite": null, +- "_duration": 0.1, +- "_zoomScale": 1.2, +- "_target": { +- "__id__": 5 +- }, +- "_clickEvents": [], +- "_id": "" +- }, +- { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "GjyQ1977vXrxfVCYBsd9uX" +- }, +- { +- "__type__": "cc.PrefabInfo", +- "root": { +- "__id__": 1 +- }, +- "asset": { +- "__id__": 0 +- }, +- "fileId": "02BPPmoD9Fr4wUYbbjfCpL", +- "instance": null, +- "targetOverrides": null, +- "nestedPrefabInstanceRoots": null +- }, +- { +- "__type__": "cc.Node", +- "_name": "Label", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "_parent": { +- "__id__": 6 +- }, +- "_children": [], +- "_active": true, +- "_components": [ +- { +- "__id__": 38 +- }, +- { +- "__id__": 40 +- } +- ], +- "_prefab": { +- "__id__": 42 +- }, +- "_lpos": { +- "__type__": "cc.Vec3", +- "x": "0", +- "y": "0", +- "z": 0 +- }, +- "_lrot": { +- "__type__": "cc.Quat", +- "x": 0, +- "y": 0, +- "z": 0 +- }, +- "_lscale": { +- "__type__": "cc.Vec3", +- "x": 1, +- "y": 1, +- "z": 1 +- }, +- "_mobility": 0, +- "_layer": 1073741824, +- "_euler": { +- "__type__": "cc.Vec3", +- "x": 0, +- "y": 0, +- "z": 0 +- }, +- "_id": "" ++ "fileId": "ZxNiZBkby9tj7SSbfpOQmU" + }, + { + "__type__": "cc.UITransform", +@@ -915,92 +368,16 @@ + "_objFlags": 0, + "__editorExtras__": {}, + "node": { +- "__id__": 37 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 39 +- }, +- "_contentSize": { +- "__type__": "cc.Size", +- "width": 80, +- "height": 50.4 +- }, +- "_anchorPoint": { +- "__type__": "cc.Vec2", +- "x": 0.5, +- "y": 0.5 +- }, +- "_id": "" +- }, +- { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "gB0bJUZxLG984BYtCpBwft" +- }, +- { +- "__type__": "cc.Label", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 37 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 41 +- }, +- "_string": "确认", +- "_horizontalAlign": 1, +- "_verticalAlign": 1, +- "_actualFontSize": 40, +- "_fontSize": 40, +- "_fontFamily": "Arial", +- "_lineHeight": 40, +- "_overflow": 0, +- "_enableWrapText": true, +- "_font": null, +- "_isSystemFontUsed": true, +- "_spacingX": 0, +- "_isItalic": false, +- "_isBold": false, +- "_isUnderline": false, +- "_underlineHeight": 2, +- "_cacheMode": 0, +- "_id": "" +- }, +- { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "PeVcK0N3Bfg/1JYVvSj2xK" +- }, +- { +- "__type__": "cc.PrefabInfo", +- "root": { + "__id__": 1 + }, +- "asset": { +- "__id__": 0 +- }, +- "fileId": "e5UICqWq5MG63eNgf9M0LM", +- "instance": null, +- "targetOverrides": null, +- "nestedPrefabInstanceRoots": null +- }, +- { +- "__type__": "cc.UITransform", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 6 +- }, + "_enabled": true, + "__prefab": { +- "__id__": 44 ++ "__id__": 16 + }, + "_contentSize": { + "__type__": "cc.Size", +- "width": 40, +- "height": 36 ++ "width": 1600, ++ "height": 720 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", +@@ -1011,126 +388,10 @@ + }, + { + "__type__": "cc.CompPrefabInfo", +- "fileId": "AGB0G5BF1YyiNtQeJAcurv" +- }, +- { +- "__type__": "cc.Sprite", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 6 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 46 +- }, +- "_spriteFrame": { +- "__uuid__": "dcc4530b-344b-40b6-8fbb-9fa35db6a289@f9941", +- "__expectedType__": "cc.SpriteFrame" +- }, +- "_customMaterial": null, +- "_srcBlendFactor": 2, +- "_dstBlendFactor": 4, +- "_color": { +- "__type__": "cc.Color", +- "r": 255, +- "g": 255, +- "b": 255, +- "a": 255 +- }, +- "_type": 1, +- "_fillType": 0, +- "_sizeMode": 0, +- "_fillCenter": { +- "__type__": "cc.Vec2", +- "x": 0, +- "y": 0 +- }, +- "_fillStart": 0, +- "_fillRange": 0, +- "_isTrimmedMode": true, +- "_useGrayscale": false, +- "_atlas": null, +- "_id": "" +- }, +- { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "h37wdN+UgnU17SY2M12hdW" ++ "fileId": "h4SYJyuqRHeM6Xiu5UirLi" + }, + { +- "__type__": "cc.Button", +- "_name": "", +- "_objFlags": 0, +- "__editorExtras__": {}, +- "node": { +- "__id__": 6 +- }, +- "_enabled": true, +- "__prefab": { +- "__id__": 48 +- }, +- "_interactable": true, +- "_transition": 3, +- "_normalColor": { +- "__type__": "cc.Color", +- "r": 255, +- "g": 255, +- "b": 255, +- "a": 255 +- }, +- "_hoverColor": { +- "__type__": "cc.Color", +- "r": 211, +- "g": 211, +- "b": 211, +- "a": 255 +- }, +- "_pressedColor": { +- "__type__": "cc.Color", +- "r": 255, +- "g": 255, +- "b": 255, +- "a": 255 +- }, +- "_disabledColor": { +- "__type__": "cc.Color", +- "r": 124, +- "g": 124, +- "b": 124, +- "a": 255 +- }, +- "_normalSprite": null, +- "_hoverSprite": null, +- "_pressedSprite": null, +- "_disabledSprite": null, +- "_duration": 0.1, +- "_zoomScale": 1.2, +- "_target": { +- "__id__": 6 +- }, +- "_clickEvents": [], +- "_id": "" +- }, +- { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "qkYAj5XtAah2Twd5tNwukq" +- }, +- { +- "__type__": "cc.PrefabInfo", +- "root": { +- "__id__": 1 +- }, +- "asset": { +- "__id__": 0 +- }, +- "fileId": "86gB+1/JZBZqIdKZQ/I8Uz", +- "instance": null, +- "targetOverrides": null, +- "nestedPrefabInstanceRoots": null +- }, +- { +- "__type__": "cc.UITransform", ++ "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, +@@ -1139,25 +400,29 @@ + }, + "_enabled": true, + "__prefab": { +- "__id__": 51 +- }, +- "_contentSize": { +- "__type__": "cc.Size", +- "width": 100, +- "height": 100 +- }, +- "_anchorPoint": { +- "__type__": "cc.Vec2", +- "x": 0.5, +- "y": 0.5 ++ "__id__": 18 + }, ++ "_alignFlags": 45, ++ "_target": null, ++ "_left": 0, ++ "_right": 0, ++ "_top": 0, ++ "_bottom": 0, ++ "_horizontalCenter": 0, ++ "_verticalCenter": 0, ++ "_isAbsLeft": true, ++ "_isAbsRight": true, ++ "_isAbsTop": true, ++ "_isAbsBottom": true, ++ "_isAbsHorizontalCenter": true, ++ "_isAbsVerticalCenter": true, ++ "_originalWidth": 0, ++ "_originalHeight": 0, ++ "_alignMode": 2, ++ "_lockFlags": 0, + "_id": "" + }, + { +- "__type__": "cc.CompPrefabInfo", +- "fileId": "682C+Q+mq4CTh29JveS645" +- }, +- { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 +@@ -1165,7 +430,7 @@ + "asset": { + "__id__": 0 + }, +- "fileId": "a0XVVb+sJBzKcACQDAyw8u", ++ "fileId": "ur25Y7TU0TKvsIbemih80X", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null diff --git a/cocoscreator_projects/framework-tests/legacy-layer-migration/poc-iconbutton.test.mjs b/cocoscreator_projects/framework-tests/legacy-layer-migration/poc-iconbutton.test.mjs new file mode 100644 index 0000000..2af0c8b --- /dev/null +++ b/cocoscreator_projects/framework-tests/legacy-layer-migration/poc-iconbutton.test.mjs @@ -0,0 +1,31 @@ +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import { execSync } from 'node:child_process'; +import { existsSync, readFileSync } from 'node:fs'; + +// PoC 阶段 1 端到端: Layer00619 BackHall_Layer (1 Spirit, type=3 ProgressBar) → +// prefab JSON + (diff, if any) → 关键字段校验. +// +// 注: 原 brief 建议 IconButton, 但 IconButton 无对应 Layer; spec 改用 BackHall_Layer +// 作为最简 1-Spirit PoC. Target YouleNexus prefab 不存在时 CLI 仅生成 prefab, 不报错. +// +// 路径从 cocoscreator_projects/ 运行 (与其他 legacy-layer-migration 测试一致). +const CLI = 'node scripts/legacy-layer-to-cocos-prefab-cli.mjs'; +const INPUT = '../projects/Game_Surface_3/save/Layer00619.xml'; +const TARGET = 'YouleNexus/assets/framework/ui/prefabs/widgets/Layer619_BackOtherGame.prefab'; +const OUTPUT_DIR = 'YouleNexus/out/legacy-migration/'; +const OUTPUT = 'YouleNexus/out/legacy-migration/BackHall_Layer.prefab'; + +test('Layer00619 端到端生成 + 校验关键字段', () => { + execSync(`${CLI} ${INPUT} ${TARGET} ${OUTPUT_DIR}`, { stdio: 'pipe' }); + + assert.ok(existsSync(OUTPUT), `${OUTPUT} 应生成`); + const json = JSON.parse(readFileSync(OUTPUT, 'utf8')); + assert.ok(Array.isArray(json)); + assert.equal(json[0].__type__, 'cc.Prefab'); + assert.equal(json[0]._name, 'BackHall_Layer'); + + // 校验含 group-55 父节点 (BackHall_Layer.xml Spirit BelongGroupID=55). + const groupNode = json.find(o => o.__type__ === 'cc.Node' && o._name === 'group-55'); + assert.ok(groupNode, '应有 group-55 父节点'); +}); \ No newline at end of file diff --git a/cocoscreator_projects/scripts/legacy-layer-to-cocos-prefab-cli.mjs b/cocoscreator_projects/scripts/legacy-layer-to-cocos-prefab-cli.mjs new file mode 100644 index 0000000..c1e9757 --- /dev/null +++ b/cocoscreator_projects/scripts/legacy-layer-to-cocos-prefab-cli.mjs @@ -0,0 +1,35 @@ +#!/usr/bin/env node +// CLI 入口: Layer XML → Cocos prefab JSON (+ 对比 diff, 如提供 YouleNexus 现存 prefab). +// +// 用法: node legacy-layer-to-cocos-prefab-cli.mjs [] +// +// 设计要点 (Task 9 brief): +// - 只输出到隔离目录 (out/legacy-migration/), 不直接覆盖 YouleNexus 现有 prefab. +// - 必填参数: inputXml + outputDir; youlePrefab 可选, 提供且文件存在时生成 .diff. +// - diff 命令来自 Git Bash / POSIX 环境 (Windows: Git for Windows 自带 diff). +import { readLayerXml, emitPrefabJson } from './legacy-layer-to-cocos-prefab.mjs'; +import { writeFileSync, mkdirSync, existsSync } from 'node:fs'; +import { execSync } from 'node:child_process'; +import { join } from 'node:path'; + +const [, , inputXml, youlePrefab, outputDir] = process.argv; +if (!inputXml || !outputDir) { + console.error('Usage: node legacy-layer-to-cocos-prefab-cli.mjs '); + process.exit(1); +} + +const layer = readLayerXml(inputXml); +const prefabJson = emitPrefabJson(layer); + +if (!existsSync(outputDir)) mkdirSync(outputDir, { recursive: true }); +const outputPath = join(outputDir, `${layer.layerName}.prefab`); +writeFileSync(outputPath, JSON.stringify(prefabJson, null, 2)); +console.log(`Generated: ${outputPath}`); + +if (youlePrefab && existsSync(youlePrefab)) { + const diffPath = `${outputPath}.diff`; + // `|| true` 确保 diff 找到差异时返回非零退出码不致 CLI 崩溃. + const diff = execSync(`diff -u "${youlePrefab}" "${outputPath}" || true`, { encoding: 'utf8' }); + writeFileSync(diffPath, diff); + console.log(`Diff: ${diffPath} (${diff.split('\n').length} lines)`); +} \ No newline at end of file