// WL777_Apply.cs — PD 지시 #777 설정 에셋 집행 (에디트 모드) // unity command run_script --file AgentScripts/WL777_Apply.cs --entry WL777_Apply.SetFollow --args '[1, 0, 0]' // unity command run_script --file AgentScripts/WL777_Apply.cs --entry WL777_Apply.Verify // 값은 CLI 인자로만 받고 코드 상수로 두지 않는다(C45). 저장 위치 = SlashTrailSettings.asset(SOT). using System.Text; using UnityEditor; using UnityEngine; public static class WL777_Apply { const string SettingsPath = "Assets/WL/Settings/Resources/WL/SlashTrailSettings.asset"; public static object SetFollow(int follow, int followRotation, float seconds) { var so = AssetDatabase.LoadAssetAtPath(SettingsPath); if (so == null) return "asset 없음: " + SettingsPath; so.arcFollowPlayer = follow != 0; so.arcFollowRotation = followRotation != 0; so.arcFollowSeconds = seconds; EditorUtility.SetDirty(so); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); WL.Combat.SlashTrailSettings.ClearCache(); return Verify(); } public static object Verify() { var so = AssetDatabase.LoadAssetAtPath(SettingsPath); if (so == null) return "asset 없음: " + SettingsPath; var sb = new StringBuilder(); sb.AppendLine("asset: " + SettingsPath); sb.AppendLine(string.Format(" arcFollowPlayer={0} arcFollowRotation={1} arcFollowSeconds={2}", so.arcFollowPlayer, so.arcFollowRotation, so.arcFollowSeconds)); sb.AppendLine(string.Format(" burstMode={0} burstTiming={1} suppressMode={2} drawRibbon={3} arcAnchor={4}", so.burstMode, so.burstTiming, so.suppressMode, so.drawRibbon, so.arcAnchor)); return sb.ToString(); } }