From c23fdeb91aa7005747a7c5e8752a5aef308329b4 Mon Sep 17 00:00:00 2001 From: swrring Date: Sun, 13 Sep 2026 12:26:42 +0900 Subject: [PATCH] =?UTF-8?q?[WL-816d]=20=EB=8D=98=EC=A0=84=20=EC=94=AC=20?= =?UTF-8?q?=EB=8B=A8=EB=8F=85=20Play=20=EA=B0=80=EB=93=9C=20+=20=EC=B9=98?= =?UTF-8?q?=EB=B9=84=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=20=EA=B2=AC=EA=B3=A0=ED=99=94=20(#816)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 --- Assets/WL/Island/Resources.meta | 8 +++- Assets/WL/Island/Resources/WL.meta | 8 +++- Assets/WL/Island/Scenes.meta | 8 +++- Assets/WL/Island/WLDungeonSceneSetup.cs | 10 +++++ Assets/WL/Island/WLIslandBridge.cs | 1 - Assets/WL/Island/WLIslandSceneSetup.cs | 50 +++++++++++++++---------- 6 files changed, 61 insertions(+), 24 deletions(-) diff --git a/Assets/WL/Island/Resources.meta b/Assets/WL/Island/Resources.meta index 0e9013f3c..8fbba094b 100644 --- a/Assets/WL/Island/Resources.meta +++ b/Assets/WL/Island/Resources.meta @@ -1,2 +1,8 @@ fileFormatVersion: 2 -guid: 736faf4adc74e2343aefce8a1281a933 \ No newline at end of file +guid: 736faf4adc74e2343aefce8a1281a933 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/WL/Island/Resources/WL.meta b/Assets/WL/Island/Resources/WL.meta index 46e71aec8..6c48c3ac9 100644 --- a/Assets/WL/Island/Resources/WL.meta +++ b/Assets/WL/Island/Resources/WL.meta @@ -1,2 +1,8 @@ fileFormatVersion: 2 -guid: ac3fb08ed9e62af4295fd6ddc45d9ef8 \ No newline at end of file +guid: ac3fb08ed9e62af4295fd6ddc45d9ef8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/WL/Island/Scenes.meta b/Assets/WL/Island/Scenes.meta index 7aed93239..972a20776 100644 --- a/Assets/WL/Island/Scenes.meta +++ b/Assets/WL/Island/Scenes.meta @@ -1,2 +1,8 @@ fileFormatVersion: 2 -guid: c1c85be0c23fb5a4ba3db7b9b8308fd5 \ No newline at end of file +guid: c1c85be0c23fb5a4ba3db7b9b8308fd5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/WL/Island/WLDungeonSceneSetup.cs b/Assets/WL/Island/WLDungeonSceneSetup.cs index 347ed93cb..69fba7a6d 100644 --- a/Assets/WL/Island/WLDungeonSceneSetup.cs +++ b/Assets/WL/Island/WLDungeonSceneSetup.cs @@ -20,6 +20,7 @@ using System.Collections.Generic; using TMPro; using Unity.AI.Navigation; using UnityEngine; +using UnityEngine.AI; using UnityEngine.SceneManagement; using WL.Combat.Stage; @@ -51,6 +52,15 @@ namespace WL.Island // β‘  NavMesh if (cfg.bakeDungeonNavMesh != 0) BakeNavMesh(cfg, scene); + // πŸ”΄ 단독 Play(μ”¬λ§Œ μ—΄κ³  Play = 룩 확인 경둜)μ—λŠ” ν…Œμ΄λΈ”Β·ServerData κ°€ μ—†λ‹€. + // μŠ€ν¬λ„ˆΒ·μŠ€ν…Œμ΄μ§€λŠ” 원본 ν…Œμ΄λΈ”μ„ νƒ€λ―€λ‘œ μ—¬κΈ°μ„œ λ©ˆμΆ˜λ‹€ β€” 씬 룩만 ν™•μΈν•œλ‹€. + if (InGameInfo.Ins == null) + { + LastLog = "λ˜μ „ 씬 단독 Play β€” 룩만 확인(μŠ€ν¬λ„ˆΒ·μŠ€ν…Œμ΄μ§€ κ±΄λ„ˆλœ€)"; + WLIslandBridge.Log(cfg, LastLog); + yield break; + } + // β‘‘ μŠ€ν¬λ„ˆ β€” μŠ€ν…Œμ΄μ§€ ν‘œκ°€ μš”κ΅¬ν•˜λŠ” ID 둜만 λ§Œλ“ λ‹€ s_made.Clear(); var def = StageDefOf(d); diff --git a/Assets/WL/Island/WLIslandBridge.cs b/Assets/WL/Island/WLIslandBridge.cs index 013ad800b..be6eb7bce 100644 --- a/Assets/WL/Island/WLIslandBridge.cs +++ b/Assets/WL/Island/WLIslandBridge.cs @@ -79,7 +79,6 @@ namespace WL.Island { if (s_runner != null) return; var go = new GameObject("~WLIslandRunner"); - go.hideFlags = HideFlags.HideAndDontSave; Object.DontDestroyOnLoad(go); s_runner = go.AddComponent(); } diff --git a/Assets/WL/Island/WLIslandSceneSetup.cs b/Assets/WL/Island/WLIslandSceneSetup.cs index e82427b79..7f54872c4 100644 --- a/Assets/WL/Island/WLIslandSceneSetup.cs +++ b/Assets/WL/Island/WLIslandSceneSetup.cs @@ -145,29 +145,39 @@ namespace WL.Island /// μ „νˆ¬/이동 μ»΄ν¬λ„ŒνŠΈλ₯Ό λ–Όμ–΄ λ‚Έλ‹€ β€” λ‚¨κΈ°λŠ” 것은 Animator Β· λ Œλ”λŸ¬ Β· WL 룩/크기 보정뿐. static void StripCombatComponents(GameObject root) { - var mbs = root.GetComponentsInChildren(true); - for (int i = 0; i < mbs.Length; i++) + // πŸ”΄ [RequireComponent] 의쑴 λ•Œλ¬Έμ— μˆœμ„œμ— 따라 μ‚­μ œκ°€ 거뢀될 수 μžˆλ‹€ β†’ 2회 ν›‘κ³  κ°œλ³„ try + for (int pass = 0; pass < 2; pass++) { - var mb = mbs[i]; - if (mb == null) continue; - if (mb is WL.Character.WLPcScaleCompensator) continue; // 높이 1.1912 m μœ μ§€ - if (mb is WL.Look.Character.WLCharacterLook) continue; // νŒ”λ ˆνŠΈ UV λ„νŠΈν™”(814x) μœ μ§€ - Object.DestroyImmediate(mb); + var mbs = root.GetComponentsInChildren(true); + for (int i = 0; i < mbs.Length; i++) + { + var mb = mbs[i]; + if (mb == null) continue; + if (mb is WL.Character.WLPcScaleCompensator) continue; // 높이 1.1912 m μœ μ§€ + if (mb is WL.Look.Character.WLCharacterLook) continue; // νŒ”λ ˆνŠΈ UV λ„νŠΈν™”(814x) μœ μ§€ + Kill(mb); + } } - var cc = root.GetComponent(); if (cc != null) Object.DestroyImmediate(cc); - var agents = root.GetComponentsInChildren(true); - for (int i = 0; i < agents.Length; i++) if (agents[i] != null) Object.DestroyImmediate(agents[i]); - var obs = root.GetComponentsInChildren(true); - for (int i = 0; i < obs.Length; i++) if (obs[i] != null) Object.DestroyImmediate(obs[i]); - var rbs = root.GetComponentsInChildren(true); - for (int i = 0; i < rbs.Length; i++) if (rbs[i] != null) Object.DestroyImmediate(rbs[i]); - var cols = root.GetComponentsInChildren(true); - for (int i = 0; i < cols.Length; i++) if (cols[i] != null) Object.DestroyImmediate(cols[i]); - var srcs = root.GetComponentsInChildren(true); - for (int i = 0; i < srcs.Length; i++) if (srcs[i] != null) Object.DestroyImmediate(srcs[i]); - var listeners = root.GetComponentsInChildren(true); - for (int i = 0; i < listeners.Length; i++) if (listeners[i] != null) Object.DestroyImmediate(listeners[i]); + KillAll(root.GetComponentsInChildren(true)); + KillAll(root.GetComponentsInChildren(true)); + KillAll(root.GetComponentsInChildren(true)); + KillAll(root.GetComponentsInChildren(true)); // CharacterController 포함 + KillAll(root.GetComponentsInChildren(true)); + KillAll(root.GetComponentsInChildren(true)); + } + + static void KillAll(T[] arr) where T : Component + { + if (arr == null) return; + for (int i = 0; i < arr.Length; i++) Kill(arr[i]); + } + + static void Kill(Component c) + { + if (c == null) return; + try { Object.DestroyImmediate(c); } + catch (System.Exception) { var b = c as Behaviour; if (b != null) b.enabled = false; } } static int HideFiModel(WLIslandSettings cfg, GameObject fiPlayer, GameObject exclude)