From 91fbe5ba9fd7187703a39fceaa3a2bdcce2f5b40 Mon Sep 17 00:00:00 2001 From: swrring Date: Tue, 15 Sep 2026 14:59:53 +0900 Subject: [PATCH] =?UTF-8?q?[WL-816w]=20=EC=9D=B4=EB=8F=99=20=EA=B9=9C?= =?UTF-8?q?=EB=B9=A1=EC=9E=84=20=EC=8B=A4=EC=B8=A1=20=C2=B7=20=EC=84=AC=20?= =?UTF-8?q?=EC=9A=B8=ED=83=80=EB=A6=AC=20=EC=A0=9C=EA=B1=B0=20=C2=B7=20?= =?UTF-8?q?=EB=B0=AD=20=EC=9E=90=EB=A6=AC=20=ED=9D=99=20(#816)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ① 깜빡임: PD 경로(InGame+Level01 Additive)에서 걸으며 프레임별 실측 — 재현 0 (화면차 중앙값 2.61 · 중앙값×3 초과 0/119 · 렌더러 증감 0/89 · dt 16.7ms 일정). viewCull ON/OFF 대조도 1154~1155 · 튐 0 → 값 변경 없음. ② 울타리: IslandManager/Island (0)/Fence01·(1)·(2) = FI 섬 타일 장식(Farm 자식 아님). hideIslandFences 로 렌더러만 끈다(원본 0줄 · 확장 타일도 Co_ReHide 에서). ③ 밭 자리 흙: showFarmSoil 로 Soil 렌더러는 남기고(콜라이더는 계속 off) soilTargetColor 를 화면 실측으로 재수렴 (164,168,138) vs 데모 흙 (164,168,139). Co-Authored-By: Claude Opus 5 (1M context) --- .../Resources/WL/WLIslandSettings.asset | 4 ++ Assets/WL/Island/WLIslandGateFlow.cs | 67 ++++++++++++++++++- Assets/WL/Island/WLIslandSettings.cs | 13 ++++ .../Resources/WL/WLIslandLookSettings.asset | 2 +- 4 files changed, 84 insertions(+), 2 deletions(-) diff --git a/Assets/WL/Island/Resources/WL/WLIslandSettings.asset b/Assets/WL/Island/Resources/WL/WLIslandSettings.asset index be3ba3f9a..d6ee6862a 100644 --- a/Assets/WL/Island/Resources/WL/WLIslandSettings.asset +++ b/Assets/WL/Island/Resources/WL/WLIslandSettings.asset @@ -50,6 +50,10 @@ MonoBehaviour: gateFlowEnabled: 1 hideFarms: 1 farmReHideDelaySeconds: 3 + showFarmSoil: 1 + hideIslandFences: 1 + islandFenceNamePrefixes: + - Fence matchNewTileMaterials: 1 dungeonUnlockPrefsKey: WL_Island_DungeonsUnlocked dungeonUnlockPrices: 0a0000001e0000003c00000064000000 diff --git a/Assets/WL/Island/WLIslandGateFlow.cs b/Assets/WL/Island/WLIslandGateFlow.cs index e116c660a..8338e3782 100644 --- a/Assets/WL/Island/WLIslandGateFlow.cs +++ b/Assets/WL/Island/WLIslandGateFlow.cs @@ -32,6 +32,7 @@ using UnityEngine.SceneManagement; using FIFarm = CryingSnow.FarmingIsland.Farm; using FIIsland = CryingSnow.FarmingIsland.Island; using FIIslandManager = CryingSnow.FarmingIsland.IslandManager; +using FISoil = CryingSnow.FarmingIsland.Soil; using FIPurchaser = CryingSnow.FarmingIsland.Purchaser; using FIPurchaserData = CryingSnow.FarmingIsland.PurchaserData; @@ -88,6 +89,8 @@ namespace WL.Island Vector3 farmCenter; bool haveFarm = HideFarms(cfg, scene, out farmCenter); + HideIslandFences(cfg, scene, null); + HookIslandActivation(cfg, scene); s_farmCenter = farmCenter; @@ -278,6 +281,8 @@ namespace WL.Island if (!zoneSet) { zone = rends[r].bounds; zoneSet = true; } // WL-816u — 구역 전체 else zone.Encapsulate(rends[r].bounds); } + // 🔴 WL-816w ③ — 흙칸(Soil)은 남긴다(밭 자리가 흙으로 보이게). 콜라이더는 아래에서 끈다. + if (IsSoilRenderer(cfg, rends[r])) { SoilRenderersKept++; continue; } rends[r].enabled = false; s_hiddenRends.Add(rends[r]); RenderersHidden++; } @@ -312,6 +317,60 @@ namespace WL.Island public static Bounds ZoneBounds; public static bool ZoneBoundsValid; + /// WL-816w 진단 — 남겨 둔 흙칸 렌더러 수 · 끈 울타리 렌더러 수. + public static int SoilRenderersKept, FenceRenderersHidden; + + /// WL-816w ③ — 이 렌더러가 흙칸(FI `Soil`)의 것인가(자기 자신 또는 부모). + static bool IsSoilRenderer(WLIslandSettings cfg, Renderer r) + { + if (cfg.showFarmSoil == 0 || r == null) return false; + return r.GetComponentInParent(true) != null; + } + + /// + /// 🔴 WL-816w ② — FI 섬 타일의 장식 **울타리**를 화면에서 없앤다(렌더러만 · 원본 0줄). + /// 실측(816w): `IslandManager/Island (0)/Fence01`·`(1)`·`(2)` 3개가 밭 옆 (6·8·10, 0, 4) 에 서 있고 + /// **Farm 자식이 아니라 섬 타일 자식**이라 816g 의 밭 숨김이 훑지 못했다. + /// `isl` 이 null 이면 씬 전체, 아니면 그 섬만 훑는다(확장으로 새로 열린 타일). + /// + static void HideIslandFences(WLIslandSettings cfg, Scene scene, FIIsland isl) + { + if (cfg == null || cfg.hideIslandFences == 0) return; + var pre = cfg.islandFenceNamePrefixes; + if (pre == null || pre.Length == 0) return; + + if (isl != null) { HideFencesUnder(pre, isl.transform); return; } + + var islands = Object.FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None); + for (int i = 0; i < islands.Length; i++) + { + if (islands[i] == null) continue; + if (scene.IsValid() && islands[i].gameObject.scene != scene) continue; + HideFencesUnder(pre, islands[i].transform); + } + } + + static void HideFencesUnder(string[] pre, Transform root) + { + for (int c = 0; c < root.childCount; c++) + { + var ch = root.GetChild(c); + bool hit = false; + for (int p = 0; p < pre.Length; p++) + { + if (string.IsNullOrEmpty(pre[p])) continue; + if (ch.name.StartsWith(pre[p], System.StringComparison.OrdinalIgnoreCase)) { hit = true; break; } + } + if (!hit) continue; + var rends = ch.GetComponentsInChildren(true); + for (int r = 0; r < rends.Length; r++) + { + if (rends[r] == null || !rends[r].enabled) continue; + rends[r].enabled = false; s_hiddenRends.Add(rends[r]); FenceRenderersHidden++; + } + } + } + /// 섬이 나중에 열리면 ① 그 섬의 밭을 다시 숨기고 ② 타일 재질을 기존 타일과 맞춘다(§1). static void HookIslandActivation(WLIslandSettings cfg, Scene scene) { @@ -347,6 +406,8 @@ namespace WL.Island MatchTileMaterials(cfg, isl); + HideIslandFences(cfg, isl.gameObject.scene, isl); // WL-816w ② — 새로 열린 타일의 울타리도 + if (cfg.hideFarms == 0) yield break; var farms = isl.GetComponentsInChildren(true); for (int i = 0; i < farms.Length; i++) @@ -354,7 +415,11 @@ namespace WL.Island if (farms[i] == null) continue; var rends = farms[i].GetComponentsInChildren(true); for (int r = 0; r < rends.Length; r++) - if (rends[r] != null && rends[r].enabled) { rends[r].enabled = false; s_hiddenRends.Add(rends[r]); RenderersHidden++; } + { + if (rends[r] == null || !rends[r].enabled) continue; + if (IsSoilRenderer(cfg, rends[r])) { SoilRenderersKept++; continue; } // WL-816w ③ + rends[r].enabled = false; s_hiddenRends.Add(rends[r]); RenderersHidden++; + } var cols = farms[i].GetComponentsInChildren(true); for (int c = 0; c < cols.Length; c++) if (cols[c] != null && cols[c].enabled) { cols[c].enabled = false; s_hiddenCols.Add(cols[c]); } diff --git a/Assets/WL/Island/WLIslandSettings.cs b/Assets/WL/Island/WLIslandSettings.cs index 91a842cd5..efe824445 100644 --- a/Assets/WL/Island/WLIslandSettings.cs +++ b/Assets/WL/Island/WLIslandSettings.cs @@ -224,6 +224,19 @@ namespace WL.Island "(확장 연출 1초 + 흙칸 연출 + 룩 재적용 1.4초가 끝날 시간).")] public float farmReHideDelaySeconds = 3.0f; + [Tooltip("🔴 WL-816w ③ — 1 이면 밭을 숨길 때 **흙칸(Soil) 렌더러는 남긴다** = 밭 자리가 " + + "초록 풀밭이 아니라 **흙**으로 보인다(PD 지시). 콜라이더는 그대로 꺼지므로 " + + "농사·상호작용은 계속 비활성이다. 0 = 816g 동작(흙칸까지 통째로 숨김).")] + public int showFarmSoil = 1; + + [Tooltip("🔴 WL-816w ② — 1 이면 FI 섬 타일의 장식 **울타리**(Island/Fence*) 렌더러를 끈다. " + + "인게임이 아닌 섬에 말뚝 울타리가 서 있는 것을 PD 가 지적했다. " + + "밭(Farm) 자식이 아니라 **섬 타일 자식**이라 816g 밭 숨김이 훑지 못했다(실측).")] + public int hideIslandFences = 1; + + [Tooltip("울타리로 판정할 오브젝트 이름 접두어(대소문자 무시).")] + public string[] islandFenceNamePrefixes = new[] { "Fence" }; + [Tooltip("🔴 §1 — 1 이면 **새로 열린 타일**의 머티리얼 배열을 이미 열려 있는 타일과 **같게** 만든다. " + "실측: 바닥 색 자체는 이미 같지만(main b1e58d795), 새 타일만 외곽선 패스(WL/HullOutline)를 " + "못 받아 경계에서 테두리 유무가 갈린다. 새 머티리얼을 만들지 않고 기존 배열을 물려준다.")] diff --git a/Assets/WL/Look/Farm/Resources/WL/WLIslandLookSettings.asset b/Assets/WL/Look/Farm/Resources/WL/WLIslandLookSettings.asset index 13ed9b2e8..3b65be937 100644 --- a/Assets/WL/Look/Farm/Resources/WL/WLIslandLookSettings.asset +++ b/Assets/WL/Look/Farm/Resources/WL/WLIslandLookSettings.asset @@ -42,7 +42,7 @@ MonoBehaviour: soilTint: {r: 0.84, g: 0.86, b: 0.9, a: 1} soilCheckerContrast: 0.6 soilTargetEnabled: 1 - soilTargetColor: {r: 0.3049, g: 0.4033, b: 0.2961, a: 1} + soilTargetColor: {r: 0.591, g: 0.65, b: 0.541, a: 1} ambientSky: {r: 0.212, g: 0.227, b: 0.259, a: 1} ambientEquator: {r: 0.114, g: 0.125, b: 0.133, a: 1} ambientGround: {r: 0.047, g: 0.043, b: 0.035, a: 1}