[WL-816j] 실측 스크립트·로그 (PD 경로 확인 · 데모 비교 · 되돌리기) (#816)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
깃 관리자 2026-09-13 17:33:18 +09:00
parent 89540cab17
commit 9103c7442e
6 changed files with 419 additions and 0 deletions

View File

@ -0,0 +1,6 @@
아레나 데모 수평선 = 평균 #586852 → Screenshots_WL/WL816j/o_demo_arena_horizon.png
벤더 샘플 Water = (0.00, 0.00, 0.00) scale (1.00, 1.00, 1.00)
벤더 거품 띠 = 평균 #60D4DB → Screenshots_WL/WL816j/o_demo_vendor_foam.png
벤더 전경 = 평균 #63B5B9 → Screenshots_WL/WL816j/o_demo_vendor_wide.png
나란히 = o_demo_vs_island.png(좌 아레나 데모 / 우 우리 섬 · 같은 카메라)
나란히 = o_vendor_vs_island_shore.png(좌 벤더 샘플 거품 띠 / 우 우리 섬 가장자리)

View File

@ -0,0 +1,87 @@
// WL-816j — ⑦ 데모와 나란히 (에디트 모드 렌더 · §9 데모 Play 안 함)
// ⓐ 아레나 데모(톤 기준 814t) 수평선 ⓑ 워터 셰이더 벤더 샘플 씬의 「흰 거품 띠」(물보라 기준)
using System.Text;
using UnityEngine;
using UnityEngine.Rendering.Universal;
using UnityEditor;
using UnityEditor.SceneManagement;
public static class WL816j_Demo
{
const string D = "Screenshots_WL/WL816j/";
public static void Run()
{
var sb = new StringBuilder();
// ⓐ 아레나 데모 — 우리 섬 수평선과 같은 카메라
EditorSceneManager.OpenScene("Assets/LowPolyFantasyArena/Scenes/LowPolyArena_Demo.unity", OpenSceneMode.Single);
sb.AppendLine("아레나 데모 수평선 = " + Shot(Cam(new Vector3(-14f, 8f, -14f), new Vector3(6f, 0f, 6f), 55f), D + "o_demo_arena_horizon.png", 1080, 1920));
// ⓑ 워터 셰이더 벤더 샘플 — 물이 벽에 닿는 곳의 흰 거품 띠
EditorSceneManager.OpenScene("Assets/ResWork/UToonAndRealisticWater/Scene/UToonAndRealisticShaderSampleScene.unity", OpenSceneMode.Single);
var w = GameObject.Find("Water");
Vector3 c = w != null ? w.transform.position : Vector3.zero;
sb.AppendLine("벤더 샘플 Water = " + (w != null ? w.transform.position + " scale " + w.transform.localScale : "없음"));
sb.AppendLine("벤더 거품 띠 = " + Shot(Cam(c + new Vector3(3.5f, 1.6f, 3.5f), c + new Vector3(-1f, 0f, -1f), 32f), D + "o_demo_vendor_foam.png", 720, 1280));
sb.AppendLine("벤더 전경 = " + Shot(Cam(c + new Vector3(0f, 6f, -8f), c, 55f), D + "o_demo_vendor_wide.png", 1080, 1920));
Strip(new[] { D + "o_demo_arena_horizon.png", D + "n_after_horizon.png" }, D + "o_demo_vs_island.png");
Strip(new[] { D + "o_demo_vendor_foam.png", D + "n_after_shore.png" }, D + "o_vendor_vs_island_shore.png");
sb.AppendLine("나란히 = o_demo_vs_island.png(좌 아레나 데모 / 우 우리 섬 · 같은 카메라)");
sb.AppendLine("나란히 = o_vendor_vs_island_shore.png(좌 벤더 샘플 거품 띠 / 우 우리 섬 가장자리)");
// 다음 작업을 위해 InGame 으로 (데모 씬 저장 0)
EditorSceneManager.OpenScene("Assets/Scenes/InGame.unity", OpenSceneMode.Single);
System.IO.File.WriteAllText("AgentScripts/WL816j_DEMO.txt", sb.ToString());
Debug.Log("[816j demo]\n" + sb);
}
static Camera Cam(Vector3 pos, Vector3 at, float fov)
{
var go = new GameObject("~WL816jDemoCam"); go.hideFlags = HideFlags.DontSave;
var c = go.AddComponent<Camera>();
c.orthographic = false; c.fieldOfView = fov; c.nearClipPlane = 0.1f; c.farClipPlane = 2000f;
c.clearFlags = CameraClearFlags.Skybox; c.cullingMask = ~0; c.depth = -100f;
go.transform.position = pos; go.transform.LookAt(at);
go.AddComponent<UniversalAdditionalCameraData>();
return c;
}
static string Shot(Camera cam, string path, int w, int h)
{
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path));
var rt = new RenderTexture(w, h, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB);
rt.antiAliasing = 1; rt.Create();
var pA = RenderTexture.active;
cam.targetTexture = rt; cam.Render(); RenderTexture.active = rt;
var t = new Texture2D(w, h, TextureFormat.RGB24, false);
t.ReadPixels(new Rect(0, 0, w, h), 0, 0); t.Apply();
RenderTexture.active = pA; cam.targetTexture = null; rt.Release(); Object.DestroyImmediate(rt);
System.IO.File.WriteAllBytes(path, t.EncodeToPNG());
var px = t.GetPixels32(); long r = 0, g = 0, b = 0; int n = 0;
for (int i = 0; i < px.Length; i += 7) { r += px[i].r; g += px[i].g; b += px[i].b; n++; }
Object.DestroyImmediate(t); Object.DestroyImmediate(cam.gameObject);
return "평균 #" + ((int)(r / n)).ToString("X2") + ((int)(g / n)).ToString("X2") + ((int)(b / n)).ToString("X2") + " → " + path;
}
static void Strip(string[] paths, string outPath)
{
var ts = new Texture2D[paths.Length]; int w = 0, h = 0;
for (int i = 0; i < paths.Length; i++)
{
if (!System.IO.File.Exists(paths[i])) return;
ts[i] = new Texture2D(2, 2, TextureFormat.RGB24, false);
ts[i].LoadImage(System.IO.File.ReadAllBytes(paths[i]));
w += ts[i].width; h = Mathf.Max(h, ts[i].height);
}
var o = new Texture2D(w, h, TextureFormat.RGB24, false);
var f = new Color32[w * h];
for (int i = 0; i < f.Length; i++) f[i] = new Color32(24, 24, 28, 255);
o.SetPixels32(f);
int x = 0;
for (int i = 0; i < ts.Length; i++) { o.SetPixels32(x, 0, ts[i].width, ts[i].height, ts[i].GetPixels32()); x += ts[i].width; }
o.Apply();
System.IO.File.WriteAllBytes(outPath, o.EncodeToPNG());
Object.DestroyImmediate(o);
for (int i = 0; i < ts.Length; i++) Object.DestroyImmediate(ts[i]);
}
}

View File

@ -0,0 +1,30 @@
=== WL-816j ⑥ 최종 확인 ===
Load_Map(900) = 🔴 로그인 없이는 못 탄다 → LoadSceneAsync(Level01, Additive)
1) 물 = Farm_Water_WL_D · 셰이더 Shader Graphs/ToonWaterU · 물 교체 1 · 렌더러 1575
물 오브젝트 그대로인가 : MeshCollider=있음 enabled=True mesh=Plane · MeshFilter=Plane · layer=0 · pos=(0.0, -1.0, 0.0) · scale=(100, 1, 100)
2) 걷기: (0.00, 0.00, 0.00) → (4.24, 0.01, 4.24) · 이동 6.00 m · grounded=True
3) 섬 타일 4 · 풀 타일 4 · 인스턴스 557 · 드로우콜 2 · 삼각형 5004 · 제외점 285 · 밀도 1.80(=3.24개/㎡)
1칸 잠금 → 타일 3 · 인스턴스 394 · 드로우콜 2 · 삼각형 3540 · 제외점 238 · 밀도 1.80(=3.24개/㎡) · 물 = Farm_Water_WL_D
다시 열기 → 타일 4 · 인스턴스 561 · 드로우콜 2 · 삼각형 5040 · 제외점 281 · 밀도 1.80(=3.24개/㎡) · 물 = Farm_Water_WL_D · 물 교체 누적 1 (평면 1장이라 새 가장자리도 같은 물)
4) 성능 (같은 카메라 1080×1920 · 60프레임 오프스크린 · 순서 교대 2회)
0회차 전(816h C) = 0.785 ms/frame
0회차 후(816j D) = 0.831 ms/frame
0회차 참고(FI SimpleWater) = 0.825 ms/frame
1회차 전(816h C) = 0.757 ms/frame
1회차 후(816j D) = 0.737 ms/frame
1회차 참고(FI SimpleWater) = 0.699 ms/frame
5) 되돌리기 — waterTo 를 C 로 되돌리면 816h 그대로 · waterMode 0 이면 FI 물
waterTo=C 평균 #74A1A2 → Screenshots_WL/WL816j/z_rollback_to_C.png
waterMode=0 평균 #75B2C0 → Screenshots_WL/WL816j/z_rollback_to_FI.png
6) 최종 캡처
[전 816h C] 게임 평균 #78A2A3 → Screenshots_WL/WL816j/n_before_game.png
[전 816h C] 가장자리 평균 #769DBB → Screenshots_WL/WL816j/n_before_shore.png
[전 816h C] 수평선 평균 #7C9FBE → Screenshots_WL/WL816j/n_before_horizon.png
[후 816j D] 게임 평균 #7CA4A4 → Screenshots_WL/WL816j/n_after_game.png
[후 816j D] 가장자리 평균 #7A9FBD → Screenshots_WL/WL816j/n_after_shore.png
[후 816j D] 수평선 평균 #88A5C1 → Screenshots_WL/WL816j/n_after_horizon.png
좌우 = z_final_side_by_side.png(좌 지금/우 채택) · z_final_shore_before_after.png(가장자리 확대 전/후)

View File

@ -0,0 +1,212 @@
// WL-816j — ⑥ 채택 상태 최종 확인: PD 경로(구조 재현) · 기능 무영향 · 성능 전/후 · 되돌리기 · 최종 캡처
// 🔴 자기 완결 파일 · Play 중 에셋 수정 0(렌더러의 sharedMaterial 만 교체).
using System.Collections;
using System.Text;
using UnityEngine;
using UnityEngine.Rendering.Universal;
using UnityEngine.SceneManagement;
using FIIsland = CryingSnow.FarmingIsland.Island;
public static class WL816j_Final
{
public const string D = "Screenshots_WL/WL816j/";
public static void Open()
{
UnityEditor.SceneManagement.EditorSceneManager.OpenScene(
"Assets/Scenes/InGame.unity", UnityEditor.SceneManagement.OpenSceneMode.Single);
Debug.Log("[816j] InGame 열림");
}
public static void Start()
{
var go = GameObject.Find("~WL816jFinal");
if (go != null) Object.DestroyImmediate(go);
go = new GameObject("~WL816jFinal");
go.AddComponent<WL816j_FinalRunner>();
Debug.Log("[816j] final 러너 시작");
}
public static Camera Look(string n, Vector3 pos, Vector3 at, float fov)
{
var go = GameObject.Find(n);
if (go == null) { go = new GameObject(n); go.hideFlags = HideFlags.DontSave; }
var c = go.GetComponent<Camera>(); if (c == null) c = go.AddComponent<Camera>();
c.orthographic = false; c.fieldOfView = fov; c.nearClipPlane = 0.1f; c.farClipPlane = 2000f;
c.clearFlags = CameraClearFlags.Skybox; c.cullingMask = ~0; c.depth = -100f;
go.transform.position = pos; go.transform.LookAt(at);
var a = go.GetComponent<UniversalAdditionalCameraData>();
if (a == null) a = go.AddComponent<UniversalAdditionalCameraData>();
a.renderPostProcessing = true;
return c;
}
public static string Shot(Camera cam, string path, int w, int h)
{
if (cam == null) return "카메라 없음";
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path));
var rt = new RenderTexture(w, h, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB);
rt.antiAliasing = 1; rt.Create();
var pT = cam.targetTexture; var pA = RenderTexture.active;
cam.targetTexture = rt; cam.Render(); RenderTexture.active = rt;
var t = new Texture2D(w, h, TextureFormat.RGB24, false);
t.ReadPixels(new Rect(0, 0, w, h), 0, 0); t.Apply();
RenderTexture.active = pA; cam.targetTexture = pT; rt.Release(); Object.DestroyImmediate(rt);
System.IO.File.WriteAllBytes(path, t.EncodeToPNG());
var px = t.GetPixels32(); long r = 0, g = 0, b = 0; int n = 0;
for (int i = 0; i < px.Length; i += 7) { r += px[i].r; g += px[i].g; b += px[i].b; n++; }
Object.DestroyImmediate(t);
return "평균 #" + ((int)(r / n)).ToString("X2") + ((int)(g / n)).ToString("X2") + ((int)(b / n)).ToString("X2") + " → " + path;
}
public static float Ms(Camera cam, int frames)
{
var rt = new RenderTexture(1080, 1920, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB);
rt.antiAliasing = 1; rt.Create();
var pT = cam.targetTexture; cam.targetTexture = rt;
for (int i = 0; i < 10; i++) cam.Render();
var sw = System.Diagnostics.Stopwatch.StartNew();
for (int i = 0; i < frames; i++) cam.Render();
sw.Stop();
cam.targetTexture = pT; rt.Release(); Object.DestroyImmediate(rt);
return (float)sw.Elapsed.TotalMilliseconds / frames;
}
public static void Strip(string[] paths, string outPath)
{
var ts = new Texture2D[paths.Length]; int w = 0, h = 0;
for (int i = 0; i < paths.Length; i++)
{
if (!System.IO.File.Exists(paths[i])) return;
ts[i] = new Texture2D(2, 2, TextureFormat.RGB24, false);
ts[i].LoadImage(System.IO.File.ReadAllBytes(paths[i]));
w += ts[i].width; h = Mathf.Max(h, ts[i].height);
}
var o = new Texture2D(w, h, TextureFormat.RGB24, false);
var f = new Color32[w * h];
for (int i = 0; i < f.Length; i++) f[i] = new Color32(24, 24, 28, 255);
o.SetPixels32(f);
int x = 0;
for (int i = 0; i < ts.Length; i++) { o.SetPixels32(x, 0, ts[i].width, ts[i].height, ts[i].GetPixels32()); x += ts[i].width; }
o.Apply();
System.IO.File.WriteAllBytes(outPath, o.EncodeToPNG());
Object.DestroyImmediate(o);
for (int i = 0; i < ts.Length; i++) Object.DestroyImmediate(ts[i]);
}
}
public class WL816j_FinalRunner : MonoBehaviour
{
static StringBuilder sb;
static void L(string s) { sb.AppendLine(s); }
const string D = WL816j_Final.D;
const string MatDir = "Assets/WL/Look/Farm/Materials/";
void Start() { StartCoroutine(Co()); }
IEnumerator Co()
{
sb = new StringBuilder();
L("=== WL-816j ⑥ 최종 확인 ===");
bool viaGame = false;
try { if (InGameInfo.Ins != null) { InGameInfo.Ins.Load_Map(900); viaGame = true; } }
catch (System.Exception) { }
L("Load_Map(900) = " + (viaGame ? "성공" : "🔴 로그인 없이는 못 탄다 → LoadSceneAsync(Level01, Additive)"));
if (!viaGame)
{
var op = SceneManager.LoadSceneAsync("Level01", LoadSceneMode.Additive);
while (op != null && !op.isDone) yield return null;
}
for (int i = 0; i < 7; i++) yield return new WaitForSeconds(1f);
Renderer water = null;
foreach (var r in Object.FindObjectsByType<Renderer>(FindObjectsInactive.Exclude, FindObjectsSortMode.None))
if (r != null && r.gameObject.scene.name == "Level01" && r.name == "Water") water = r;
Camera live = null;
foreach (var c in Object.FindObjectsByType<Camera>(FindObjectsInactive.Exclude, FindObjectsSortMode.None))
{
if (!c.gameObject.activeInHierarchy || !c.enabled || c.targetTexture != null) continue;
if (c.name.StartsWith("~WL816j")) continue;
if (live == null || c.depth > live.depth) live = c;
}
if (water == null || live == null) { L("🔴 물/카메라 없음"); Done(); yield break; }
var adopted = water.sharedMaterial;
L("");
L("1) 물 = " + adopted.name + " · 셰이더 " + adopted.shader.name + " · 물 교체 " + WL.Look.Farm.WLIslandLook.WaterSwapped
+ " · 렌더러 " + WL.Look.Farm.WLIslandLook.SwappedRenderers);
var mc = water.GetComponent<MeshCollider>(); var mf = water.GetComponent<MeshFilter>();
L(" 물 오브젝트 그대로인가 : MeshCollider=" + (mc ? "있음 enabled=" + mc.enabled + " mesh=" + (mc.sharedMesh ? mc.sharedMesh.name : "-") : "없음")
+ " · MeshFilter=" + (mf && mf.sharedMesh ? mf.sharedMesh.name : "-")
+ " · layer=" + water.gameObject.layer + " · pos=" + water.transform.position.ToString("F1")
+ " · scale=" + water.transform.localScale.ToString("F0"));
// ── 2) 걷기 ────────────────────────────────────────────────
var cc = Object.FindFirstObjectByType<CharacterController>(FindObjectsInactive.Exclude);
if (cc != null)
{
var p0 = cc.transform.position; var dir = new Vector3(1f, 0f, 1f).normalized; float moved = 0f;
for (int i = 0; i < 120 && moved < 6f; i++) { cc.Move(dir * 0.05f + Vector3.down * 0.05f); moved += 0.05f; yield return null; }
var p1 = cc.transform.position;
L("2) 걷기: " + p0.ToString("F2") + " → " + p1.ToString("F2") + " · 이동 "
+ Vector3.Distance(new Vector3(p0.x, 0, p0.z), new Vector3(p1.x, 0, p1.z)).ToString("F2") + " m · grounded=" + cc.isGrounded);
}
else L("2) 걷기: CharacterController 없음");
// ── 3) 섬 확장 ─────────────────────────────────────────────
var islands = Object.FindObjectsByType<FIIsland>(FindObjectsInactive.Exclude, FindObjectsSortMode.None);
L("3) 섬 타일 " + islands.Length + " · 풀 " + WL.Look.Farm.WLIslandGrass.LastLog);
FIIsland target = null;
foreach (var isl in islands) if (isl != null && isl.IsUnlocked && isl.gameObject.activeInHierarchy) target = isl;
if (target != null)
{
target.gameObject.SetActive(false); yield return new WaitForSeconds(2f);
L(" 1칸 잠금 → " + WL.Look.Farm.WLIslandGrass.LastLog + " · 물 = " + water.sharedMaterial.name);
target.gameObject.SetActive(true); yield return new WaitForSeconds(3f);
L(" 다시 열기 → " + WL.Look.Farm.WLIslandGrass.LastLog + " · 물 = " + water.sharedMaterial.name
+ " · 물 교체 누적 " + WL.Look.Farm.WLIslandLook.WaterSwapped + " (평면 1장이라 새 가장자리도 같은 물)");
}
// ── 4) 성능 전(816h C)/후(816j D) 교대 2회 ──────────────────
var C = UnityEditor.AssetDatabase.LoadAssetAtPath<Material>(MatDir + "Farm_Water_WL_C.mat");
var FI = UnityEditor.AssetDatabase.LoadAssetAtPath<Material>(MatDir + "Farm_SimpleWater_Demo.mat");
L("");
L("4) 성능 (같은 카메라 1080×1920 · 60프레임 오프스크린 · 순서 교대 2회)");
for (int round = 0; round < 2; round++)
foreach (var pr in new[] { new object[] { "전(816h C)", C }, new object[] { "후(816j D)", adopted }, new object[] { "참고(FI SimpleWater)", FI } })
{
var m = pr[1] as Material; if (m == null) continue;
water.sharedMaterial = m; yield return null; yield return null;
L(" " + round + "회차 " + (string)pr[0] + " = " + WL816j_Final.Ms(live, 60).ToString("F3") + " ms/frame");
}
// ── 5) 되돌리기 (화면으로) ──────────────────────────────────
L("");
L("5) 되돌리기 — waterTo 를 C 로 되돌리면 816h 그대로 · waterMode 0 이면 FI 물");
water.sharedMaterial = C; yield return null; yield return new WaitForSeconds(0.3f);
L(" waterTo=C " + WL816j_Final.Shot(live, D + "z_rollback_to_C.png", 1080, 1920));
water.sharedMaterial = FI; yield return null; yield return new WaitForSeconds(0.3f);
L(" waterMode=0 " + WL816j_Final.Shot(live, D + "z_rollback_to_FI.png", 1080, 1920));
// ── 6) 최종 캡처 ───────────────────────────────────────────
water.sharedMaterial = C; yield return null; yield return new WaitForSeconds(0.3f);
float zc = -3.78f, shoreX = 0f;
for (float x = 4f; x < 90f; x += 0.25f)
{ RaycastHit h; if (Physics.Raycast(new Vector3(x, 60f, zc), Vector3.down, out h, 200f) && h.point.y > -0.9f) shoreX = x; }
var shore = WL816j_Final.Look("~WL816jFS", new Vector3(shoreX + 5.5f, 2.2f, zc + 5.5f), new Vector3(shoreX - 0.5f, -1f, zc - 0.5f), 32f);
var horizon = WL816j_Final.Look("~WL816jFH", new Vector3(-14f, 8f, -14f), new Vector3(6f, 0f, 6f), 55f);
L("");
L("6) 최종 캡처");
L(" [전 816h C] 게임 " + WL816j_Final.Shot(live, D + "n_before_game.png", 1080, 1920));
L(" [전 816h C] 가장자리 " + WL816j_Final.Shot(shore, D + "n_before_shore.png", 720, 1280));
L(" [전 816h C] 수평선 " + WL816j_Final.Shot(horizon, D + "n_before_horizon.png", 1080, 1920));
water.sharedMaterial = adopted; yield return null; yield return new WaitForSeconds(0.3f);
L(" [후 816j D] 게임 " + WL816j_Final.Shot(live, D + "n_after_game.png", 1080, 1920));
L(" [후 816j D] 가장자리 " + WL816j_Final.Shot(shore, D + "n_after_shore.png", 720, 1280));
L(" [후 816j D] 수평선 " + WL816j_Final.Shot(horizon, D + "n_after_horizon.png", 1080, 1920));
WL816j_Final.Strip(new[] { D + "n_before_game.png", D + "n_after_game.png" }, D + "z_final_side_by_side.png");
WL816j_Final.Strip(new[] { D + "n_before_shore.png", D + "n_after_shore.png" }, D + "z_final_shore_before_after.png");
L(" 좌우 = z_final_side_by_side.png(좌 지금/우 채택) · z_final_shore_before_after.png(가장자리 확대 전/후)");
Done();
}
void Done()
{
System.IO.File.WriteAllText("AgentScripts/WL816j_FINAL.txt", sb.ToString());
Debug.Log("[816j final]\n" + sb);
}
}

View File

@ -0,0 +1,9 @@
=== WL-816j ⑧ PD 실행 경로(타이틀 → 로그인 → 섬) 시도 ===
5초 : 활성씬=Title · 로드된 씬 = Title
10초 : 활성씬=Title · 로드된 씬 = Title
15초 : 활성씬=Title · 로드된 씬 = Title
20초 : 활성씬=Title · 로드된 씬 = Title
보이는 버튼 = SR_TapButton(누를수있음) btn_login(누를수있음) Title(누를수있음)
보이는 글자 = [9.9.9(0)] [ID를 입력해 주세요.] [TestID] [스토어에서 정보를 받아 오고 있습니다.]
캡처 = Screenshots_WL/WL816j/p_title_attempt.png (카메라 Camera)
🔴 여기서 멈춘다 — 로그인은 §9 로 금지(PlayFab 중복 로그인). 섬까지는 타지 못했다.

View File

@ -0,0 +1,75 @@
// WL-816j — ⑧ 🔴 PD 실행 경로(타이틀 → 로그인 → 섬)를 실제로 타 본다.
// §9: 워커 세션은 Play 로그인 금지(PlayFab 중복 로그인) → 로그인 버튼을 누르지 않는다.
// 어디까지 갔는지만 정확히 기록한다.
using System.Collections;
using System.Text;
using UnityEngine;
using UnityEngine.SceneManagement;
public static class WL816j_Title
{
public static void Open()
{
UnityEditor.SceneManagement.EditorSceneManager.OpenScene(
"Assets/Scenes/Title.unity", UnityEditor.SceneManagement.OpenSceneMode.Single);
Debug.Log("[816j] Title 열림");
}
public static void Start()
{
var go = GameObject.Find("~WL816jTitle");
if (go != null) Object.DestroyImmediate(go);
go = new GameObject("~WL816jTitle");
go.AddComponent<WL816j_TitleRunner>();
}
}
public class WL816j_TitleRunner : MonoBehaviour
{
void Start() { StartCoroutine(Co()); }
IEnumerator Co()
{
var sb = new StringBuilder();
sb.AppendLine("=== WL-816j ⑧ PD 실행 경로(타이틀 → 로그인 → 섬) 시도 ===");
for (int t = 0; t < 4; t++)
{
yield return new WaitForSeconds(5f);
var names = "";
for (int i = 0; i < SceneManager.sceneCount; i++) names += SceneManager.GetSceneAt(i).name + " ";
sb.AppendLine((t * 5 + 5) + "초 : 활성씬=" + SceneManager.GetActiveScene().name + " · 로드된 씬 = " + names);
}
// 화면에 무엇이 떠 있나 (버튼 이름 전수 — 로그인 버튼은 누르지 않는다)
var btns = Object.FindObjectsByType<UnityEngine.UI.Button>(FindObjectsInactive.Exclude, FindObjectsSortMode.None);
var s = "";
foreach (var b in btns) if (b.gameObject.activeInHierarchy) s += b.name + "(" + (b.interactable ? "누를수있음" : "잠김") + ") ";
sb.AppendLine("보이는 버튼 = " + (s == "" ? "없음" : s));
var texts = Object.FindObjectsByType<TMPro.TMP_Text>(FindObjectsInactive.Exclude, FindObjectsSortMode.None);
var ts = "";
int n = 0;
foreach (var t2 in texts) if (t2.gameObject.activeInHierarchy && !string.IsNullOrWhiteSpace(t2.text) && n++ < 14) ts += "[" + t2.text.Replace("\n", " ") + "] ";
sb.AppendLine("보이는 글자 = " + ts);
Camera live = null;
foreach (var c in Object.FindObjectsByType<Camera>(FindObjectsInactive.Exclude, FindObjectsSortMode.None))
{
if (!c.gameObject.activeInHierarchy || !c.enabled || c.targetTexture != null) continue;
if (live == null || c.depth > live.depth) live = c;
}
if (live != null)
{
var rt = new RenderTexture(1080, 1920, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB);
rt.Create(); var pA = RenderTexture.active;
live.targetTexture = rt; live.Render(); RenderTexture.active = rt;
var tex = new Texture2D(1080, 1920, TextureFormat.RGB24, false);
tex.ReadPixels(new Rect(0, 0, 1080, 1920), 0, 0); tex.Apply();
RenderTexture.active = pA; live.targetTexture = null; rt.Release(); Object.DestroyImmediate(rt);
System.IO.Directory.CreateDirectory("Screenshots_WL/WL816j");
System.IO.File.WriteAllBytes("Screenshots_WL/WL816j/p_title_attempt.png", tex.EncodeToPNG());
Object.DestroyImmediate(tex);
sb.AppendLine("캡처 = Screenshots_WL/WL816j/p_title_attempt.png (카메라 " + live.name + ")");
}
sb.AppendLine("🔴 여기서 멈춘다 — 로그인은 §9 로 금지(PlayFab 중복 로그인). 섬까지는 타지 못했다.");
System.IO.File.WriteAllText("AgentScripts/WL816j_TITLE.txt", sb.ToString());
Debug.Log("[816j title]\n" + sb);
}
}