Project_WL/AgentScripts/WL_PostProbe.cs

61 lines
3.6 KiB
C#
Raw Permalink Normal View History

WL 리뉴얼 세션 2026-09-06~07 (#760~#800) — 전투·배경·UI·타격감 (조직 PD 로그 #746~#800 · 대화로그 §14~§24) - 전투: Knight@Attack1~3_S 3콤보(4 컨트롤러·클래스별 서브클립) · 타겟팅 4규칙(정면 우선·재타겟·즉시 공격·어그로 금지 · WLTargetingSettings) · 대쉬 후 공격(Stander@Chase_Start · DashDriver · 5 m · 사정거리+0.8 · 근거리 적 우선) · 공격 이동 FrameTable(발 접지 실측 표 · AttackRootMotion) · 충돌 반경/투사체 0.3 배(WLCollisionTuning) · 무적(임시)·펫 금지(WLGameplaySettings) - 검기: NamuFX Slash_B 배리언트 Effect_WLSwingArc 원 피팅 정합 배치 + 캘리브레이션(SlashArcMeasure · SlashTrailSettings) · 찌르기 Effect_WLStab 대기 · 램프 리본(BladeTrail · WL_BladeRibbon.shader · T_WL_BladeRibbonRamp) 보존(drawRibbon 0) - 타격감: Assets/WL/Feel(WLHitFeel · 히트스톱 0.03 · 셰이크 0.10 m · 몹 펀치 1.12 · Actor.Get_Damage 훅 1줄 · 원본 RealCamera 셰이크 결함 대체) - 배경/맵: LMHPOLY Demo_01~10 → WL_Nature01~10(프리팹·씬·NavMesh·스포너·BattleMapConfig) · 물(ToonWaterU) · 포스트 블룸 0.9/0.3 · 잔디(BruteForce·드레싱) 제거 · 마젠타 머티리얼 URP 변환 - UI: 세로 HUD(WL_HUD · 하단 5메뉴 폭 전체 · 채팅/전투 패드 숨김 · WLIngameUiOverride) · Title/TitleInfo 1080×1920 Expand + 배경 높이 fit(WLBackgroundFit) · 로딩 SortOrder_5(WLRawImageAspectSync · 초점표 8장) · Loading1~8 ASTC 6×6 - 도구: AgentScripts/*(LightProbe · WL_MapSwitch · WL760~WL800 프로브/집행/검증 · 상단 사용법 주석) · 에디터 락 프로토콜 파일(staging) - 제외(별도 커밋 예정): Assets/LMHPOLY(703 MB) · Assets/Feel(422 MB) · Assets/Shinabro(300 MB) — 에셋 스토어/구 WL 팩 원본 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 23:24:25 +00:00
// WL_PostProbe.cs — 지면 색/블룸 진단 (Play 전용 · 메모리만)
// unity command run_script --file AgentScripts/WL_PostProbe.cs --entry WL_PostProbe.Ray --args '[115.0, 10.0]'
// unity command run_script --file AgentScripts/WL_PostProbe.cs --entry WL_PostProbe.SetBloom --args '[0.9, 0.3]'
// unity command run_script --file AgentScripts/WL_PostProbe.cs --entry WL_PostProbe.Bloom
using System.Linq;
using System.Text;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public static class WL_PostProbe
{
public static object Ray(float x, float z)
{
if (!Application.isPlaying) return "not playing";
var sb = new StringBuilder();
var hits = Physics.RaycastAll(new Vector3(x, 60f, z), Vector3.down, 200f).OrderBy(h => h.distance).ToArray();
sb.AppendLine("hits=" + hits.Length);
foreach (var h in hits.Take(4))
{
var r = h.collider.GetComponent<Renderer>() ?? h.collider.GetComponentInParent<Renderer>();
string mat = r != null && r.sharedMaterial != null ? r.sharedMaterial.name + " / " + r.sharedMaterial.shader.name : "-";
string col = r != null && r.sharedMaterial != null && r.sharedMaterial.HasProperty("_BaseColor") ? r.sharedMaterial.GetColor("_BaseColor").ToString("F2") : "-";
string tex = r != null && r.sharedMaterial != null && r.sharedMaterial.HasProperty("_BaseMap") && r.sharedMaterial.GetTexture("_BaseMap") != null ? r.sharedMaterial.GetTexture("_BaseMap").name : "none";
sb.AppendLine(" - " + h.collider.name + " y=" + h.point.y.ToString("F2") + " renderer=" + (r != null ? r.name : "-") + " mat=" + mat + " base=" + col + " tex=" + tex + " scene=" + h.collider.gameObject.scene.name);
}
return sb.ToString();
}
public static object Bloom()
{
var sb = new StringBuilder();
foreach (var v in Object.FindObjectsByType<Volume>(FindObjectsInactive.Include, FindObjectsSortMode.None))
{
var p = v.sharedProfile; if (p == null) continue;
Bloom b; Tonemapping t; ColorAdjustments c;
sb.Append(v.name + " enabled=" + v.enabled + " active=" + v.gameObject.activeInHierarchy + " profile=" + p.name + " weight=" + v.weight + " global=" + v.isGlobal);
if (p.TryGet(out b)) sb.Append(" | bloom thr=" + b.threshold.value + " int=" + b.intensity.value + " scatter=" + b.scatter.value + " on=" + b.active);
if (p.TryGet(out t)) sb.Append(" | tonemap=" + t.mode.value);
if (p.TryGet(out c)) sb.Append(" | exposure=" + c.postExposure.value + " contrast=" + c.contrast.value + " sat=" + c.saturation.value);
sb.AppendLine();
}
var cam = Camera.main; var add = cam != null ? cam.GetComponent<UniversalAdditionalCameraData>() : null;
sb.AppendLine("camera post=" + (add != null ? add.renderPostProcessing.ToString() : "?") + " hdr=" + (cam != null ? cam.allowHDR.ToString() : "?"));
return sb.ToString();
}
public static object SetBloom(float threshold, float intensity)
{
if (!Application.isPlaying) return "not playing";
int n = 0;
foreach (var v in Object.FindObjectsByType<Volume>(FindObjectsInactive.Include, FindObjectsSortMode.None))
{
var p = v.sharedProfile; if (p == null) continue;
Bloom b; if (!p.TryGet(out b)) continue;
b.threshold.value = threshold; b.intensity.value = intensity; n++;
}
return "bloom set on " + n + " profile(s): threshold=" + threshold + " intensity=" + intensity + " (memory only)";
}
}