Project_WL/AgentScripts/WL797_MakeAsset.cs

133 lines
5.7 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
// PD #797 — WLHitFeelSettings 에셋 생성/확인/조정 (Edit 모드 전용 · 리컴파일 완료 후 실행)
// 확정값은 Edit 모드에서 굽고 Dump 로 디스크와 대조한다(Play 중 에셋 인스턴스 수정 금지).
using System.Text;
using UnityEngine;
using UnityEditor;
public static class WL797_MakeAsset
{
const string Dir1 = "Assets/WL/Feel";
const string Dir2 = "Assets/WL/Feel/Settings";
const string Dir3 = "Assets/WL/Feel/Settings/Resources";
const string Dir4 = "Assets/WL/Feel/Settings/Resources/WL";
const string Path = "Assets/WL/Feel/Settings/Resources/WL/WLHitFeelSettings.asset";
static void EnsureFolder(string parent, string leaf)
{
var full = parent + "/" + leaf;
if (!AssetDatabase.IsValidFolder(full)) AssetDatabase.CreateFolder(parent, leaf);
}
public static object Create()
{
EnsureFolder("Assets/WL", "Feel");
EnsureFolder(Dir1, "Settings");
EnsureFolder(Dir2, "Resources");
EnsureFolder(Dir3, "WL");
var so = AssetDatabase.LoadAssetAtPath<WLHitFeelSettings>(Path);
bool created = false;
if (so == null)
{
so = ScriptableObject.CreateInstance<WLHitFeelSettings>();
AssetDatabase.CreateAsset(so, Path);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
created = true;
}
return (created ? "CREATED " : "EXISTS ") + Path + "\n" + Dump();
}
/// <summary>디스크의 확정값을 그대로 읽어 출력한다(Play 중 변경이 디스크로 새지 않았는지 대조용).</summary>
public static object Dump()
{
var so = AssetDatabase.LoadAssetAtPath<WLHitFeelSettings>(Path);
if (so == null) return "MISSING " + Path;
var sb = new StringBuilder();
sb.AppendLine("── WLHitFeelSettings (disk) ──");
sb.AppendLine("enabled=" + so.enabled + " throttleSeconds=" + so.throttleSeconds);
sb.AppendLine("① hitStop: enabled=" + so.hitStopEnabled + " mode=" + so.hitStopMode
+ " dur=" + so.hitStopDuration + " killDur=" + so.hitStopKillDuration
+ " scale=" + so.hitStopTimeScale + " max=" + so.hitStopMax + " minTS=" + so.hitStopMinTimescale);
sb.AppendLine("② shake: enabled=" + so.cameraShakeEnabled + " amp=" + so.shakeAmplitude
+ " dur=" + so.shakeDuration + " freq=" + so.shakeFrequency
+ " axis=" + so.shakeAxisWeight + " killMul=" + so.shakeKillMultiplier
+ " suppressLegacy=" + so.suppressLegacyShake);
sb.AppendLine("③ punch: enabled=" + so.scalePunchEnabled + " punch=" + so.scalePunch
+ " dur=" + so.scalePunchDuration + " skipBoss=" + so.skipPunchOnBoss + " skipKill=" + so.skipPunchOnKill);
sb.AppendLine("④ flash: enabled=" + so.flashEnabled + " color=" + so.flashColor + " dur=" + so.flashDuration);
sb.AppendLine("⑤ haptic: enabled=" + so.hapticEnabled);
sb.AppendLine("log: " + so.logHits);
return sb.ToString();
}
/// <summary>세기 프리셋. args: "weak" | "mid" | "midplus" | "strong" | "off"</summary>
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
public static object Preset(string name)
{
var so = AssetDatabase.LoadAssetAtPath<WLHitFeelSettings>(Path);
if (so == null) return "MISSING " + Path;
switch ((name ?? "").ToLowerInvariant())
{
case "off":
so.enabled = false;
break;
case "weak": // A — Feel 공식 Barbarians 데모와 같은 강도
so.enabled = true;
so.hitStopDuration = 0.02f; so.hitStopKillDuration = 0.035f;
so.shakeAmplitude = 0.08f; so.shakeDuration = 0.10f;
so.scalePunch = 1.08f;
break;
case "mid": // B — 발주 기본값 (권고)
so.enabled = true;
so.hitStopDuration = 0.03f; so.hitStopKillDuration = 0.05f;
so.shakeAmplitude = 0.10f; so.shakeDuration = 0.12f;
so.scalePunch = 1.12f;
break;
case "midplus": // B+ — PD 2026-09-07 "현재보다 미세하게 강하게" (mid 와 strong 의 중간)
case "mid+":
so.enabled = true;
so.hitStopDuration = 0.04f; so.hitStopKillDuration = 0.065f;
so.shakeAmplitude = 0.11f; so.shakeDuration = 0.12f;
so.scalePunch = 1.14f;
break;
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
case "strong": // C — 발주 상한
so.enabled = true;
so.hitStopDuration = 0.05f; so.hitStopKillDuration = 0.08f;
so.shakeAmplitude = 0.12f; so.shakeDuration = 0.12f;
so.scalePunch = 1.16f;
break;
default:
return "UNKNOWN preset '" + name + "' (weak|mid|midplus|strong|off)";
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
}
EditorUtility.SetDirty(so);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
return "PRESET " + name + " applied\n" + Dump();
}
/// <summary>진단 로그 on/off. args: true|false</summary>
public static object SetLog(bool on)
{
var so = AssetDatabase.LoadAssetAtPath<WLHitFeelSettings>(Path);
if (so == null) return "MISSING " + Path;
so.logHits = on;
EditorUtility.SetDirty(so);
AssetDatabase.SaveAssets();
return "logHits=" + so.logHits;
}
/// <summary>플래시 on/off (PD 옵션).</summary>
public static object SetFlash(bool on)
{
var so = AssetDatabase.LoadAssetAtPath<WLHitFeelSettings>(Path);
if (so == null) return "MISSING " + Path;
so.flashEnabled = on;
EditorUtility.SetDirty(so);
AssetDatabase.SaveAssets();
return "flashEnabled=" + so.flashEnabled;
}
}