// WL806_Popup.cs — 후속 B: SortOrder_5.prefab/PopupUI(공용 Popup 싱글톤) 를 세로 화면에서 터치·가독 가능한 크기로 (에디트 모드 · 프리팹 컨텐츠 · Play 불필요) // unity command run_script --file AgentScripts/WL806_Popup.cs --entry WL806_Popup.Dump // unity command run_script --file AgentScripts/WL806_Popup.cs --entry WL806_Popup.Apply // unity command run_script --file AgentScripts/WL806_Popup.cs --entry WL806_Popup.Revert (2026-09-07 이전 원값) // 배경(실측 Dump 2026-09-07): 캔버스 1920×1080 Expand → 세로 1080×1920 에서 scaleFactor 0.5625. // 원값: bg 428×311 · msg 400×165 (0,30) fs20 · btn_ok 116×56 (0,-102) fs20 → 실화면 bg 241×175 px · 글자 11 px · 버튼 65×32 px (터치·가독 미달). // 목표: TitleInfo 팝업(#794 · 1080 기준 bg 860×520 · msg 780×280 (0,70) · btn_ok 340×130 (0,-150)) 과 같은 실크기 → 1920 기준 유닛 = px / 0.5625. // 글자: 로딩 화면(#800) 과 같은 실화면 ≈27 px → fs 48. using System.Text; using UnityEditor; using UnityEngine; using UnityEngine.UI; public static class WL806_Popup { const string PrefabPath = "Assets/ResWork/UIPrefabs/Title/SortOrder_5.prefab"; // 1920×1080 기준 유닛 (px / 0.5625) static readonly Vector2 BgSize = new Vector2(1529f, 924f); static readonly Vector2 MsgSize = new Vector2(1387f, 498f); static readonly Vector2 MsgPos = new Vector2(0f, 124f); static readonly Vector2 BtnSize = new Vector2(604f, 231f); static readonly Vector2 BtnPos = new Vector2(0f, -267f); const float FontSize = 48f; // 원값 static readonly Vector2 BgSize0 = new Vector2(428f, 311f); static readonly Vector2 MsgSize0 = new Vector2(400f, 165f); static readonly Vector2 MsgPos0 = new Vector2(0f, 30f); static readonly Vector2 BtnSize0 = new Vector2(116f, 56f); static readonly Vector2 BtnPos0 = new Vector2(0f, -102f); const float FontSize0 = 20f; static void Walk(Transform t, string path, StringBuilder sb, int depth) { var rt = t as RectTransform; if (rt != null) { var txt = t.GetComponent(); var tmp = t.GetComponent(); string font = txt != null ? (" Text fs=" + txt.fontSize + " bestFit=" + txt.resizeTextForBestFit) : tmp != null ? (" TMP fs=" + tmp.fontSize + " auto=" + tmp.enableAutoSizing + " wrap=" + tmp.textWrappingMode + " overflow=" + tmp.overflowMode) : ""; var img = t.GetComponent(); string im = img != null ? (" Image=" + (img.sprite != null ? img.sprite.name : "null") + " type=" + img.type) : ""; var btn = t.GetComponent