From 80453d64a05a05a9006e769eda3249f3f628b88c Mon Sep 17 00:00:00 2001 From: swrring Date: Sat, 12 Sep 2026 22:04:42 +0900 Subject: [PATCH] =?UTF-8?q?[WL-814r]=20=EC=A0=84=EC=8B=9C=20=EC=BA=90?= =?UTF-8?q?=EB=A6=AD=ED=84=B0=20=EC=95=A0=EB=8B=88=EB=A9=94=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0=20+=20=EC=9D=B4=EB=8F=99=20=EC=86=8C?= =?UTF-8?q?=EC=9A=94=EC=8B=9C=EA=B0=84=20=ED=94=84=EB=A1=9C=EB=B8=8C=20(#8?= =?UTF-8?q?14)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Animator.fireEvents=false: 클립 Idle 이 쏘는 Event_Idle 의 수신자(WizardActor)를 §1 에서 떼어 내 "AnimationEvent … has no receiver!" 가 2초마다 났다(실측 6회/12초). 빈 수신자 컴포넌트를 붙이는 대신 이벤트 발사를 끈다 → Play 콘솔 error 0. - autoWalk 프로브(기본 off): 중앙→14 m 소요 시간을 실측하기 위한 씬 전용 스위치. Co-Authored-By: Claude Opus 5 --- Assets/WL/Look/Arena/ArenaWalker.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Assets/WL/Look/Arena/ArenaWalker.cs b/Assets/WL/Look/Arena/ArenaWalker.cs index 2a32a5d4b..ca02ffe9a 100644 --- a/Assets/WL/Look/Arena/ArenaWalker.cs +++ b/Assets/WL/Look/Arena/ArenaWalker.cs @@ -50,6 +50,16 @@ namespace WL.Look.Arena public string idleState = "idle"; public string runState = "run"; + [Header("프로브 — 중앙→가장자리 소요 시간 실측용 (평소 off)")] + [Tooltip("켜면 입력 없이 autoWalkDir 로 자동 전진하고, 중앙에서 autoWalkGoal m 떨어지면 걸린 시간을 로그로 남긴다.")] + public bool autoWalk; + public Vector3 autoWalkDir = Vector3.right; + public float autoWalkGoal = 14f; + + float _autoT = -1f; + /// 자동 전진이 목표 거리에 도달한 시각(초). 아직이면 -1. + public float AutoWalkSeconds { get; private set; } = -1f; + Animator _anim; Vector3 _camOffset; bool _running; @@ -59,6 +69,13 @@ namespace WL.Look.Arena if (body == null) body = transform; if (followCamera == null) followCamera = Camera.main; _anim = body.GetComponentInChildren(); + + // 🔴 전시용 캐릭터에는 애니메이션 이벤트 수신자가 없다. + // 클립 `Idle` 이 `Event_Idle` 을 쏘는데 받는 쪽(`WizardActor`)을 떼어 냈으므로 + // 루프마다 "AnimationEvent 'Event_Idle' … has no receiver!" 에러가 난다(실측 2초에 1회). + // 빈 수신자 컴포넌트를 새로 붙이는 대신 이벤트 발사 자체를 끈다(런타임 전용 플래그). + foreach (var a in body.GetComponentsInChildren(true)) a.fireEvents = false; + if (followCamera != null) _camOffset = followCamera.transform.position - body.position; SnapToGround(); PlayState(idleState); @@ -79,6 +96,16 @@ namespace WL.Look.Arena } Vector3 dir = right * Input.GetAxisRaw("Horizontal") + fwd * Input.GetAxisRaw("Vertical"); + if (autoWalk && AutoWalkSeconds < 0f) + { + if (_autoT < 0f) _autoT = Time.time; + dir = autoWalkDir; + if (DistanceFromCenter >= autoWalkGoal) + { + AutoWalkSeconds = Time.time - _autoT; + Debug.Log(string.Format("[WL-814r] 중앙→{0:F1} m 도달: {1:F2} 초 (speed {2} m/s)", autoWalkGoal, AutoWalkSeconds, moveSpeed)); + } + } if (dir.sqrMagnitude > 1f) dir.Normalize(); bool moving = dir.sqrMagnitude > 1e-4f;