// 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(); } } 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(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(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(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); } }