fix: SkillController 클립 자동 등록 필터 추가 및 Drog 프리팹 적용
- clipAutoRegisterFilter 필드 추가로 각 캐릭터별 클립 자동 등록 필터 분리 - 필터 좌우 _ 제거 로직 추가 (예: "_Drog_" → "Drog" 매칭) - AutoRegisterPlayerClips → AutoRegisterClips으로 리네임 - Drog 프리팹에 clipAutoRegisterFilter = "_Drog_" 설정 - AC_Boss_Default의 Skill 상태 Motion을 baseSkillClip과 동일 에셋으로 수정
This commit is contained in:
@@ -2144,15 +2144,16 @@ MonoBehaviour:
|
|||||||
ShowTopMostFoldoutHeaderGroup: 1
|
ShowTopMostFoldoutHeaderGroup: 1
|
||||||
animator: {fileID: 4019041888965840580}
|
animator: {fileID: 4019041888965840580}
|
||||||
baseController: {fileID: 9100000, guid: 4bd980f1a222c5b468136f7e717925d5, type: 2}
|
baseController: {fileID: 9100000, guid: 4bd980f1a222c5b468136f7e717925d5, type: 2}
|
||||||
baseSkillClip: {fileID: -7717634560727564301, guid: 4005a77aa7d531742b1de1bec27001b1, type: 3}
|
baseSkillClip: {fileID: 7400000, guid: ace5d7e8f405a8846b98bb956f0a9313, type: 2}
|
||||||
|
clipAutoRegisterFilter: _Drog_
|
||||||
registeredClips:
|
registeredClips:
|
||||||
- {fileID: -242498254790479478, guid: 585e8961b6c6e9f4ba96bdb4ffb2cbc3, type: 3}
|
- {fileID: 7400000, guid: 58847e89d27d1b140b1075bba68445c0, type: 2}
|
||||||
- {fileID: 3627526391332626453, guid: 39aaec38fc96c4842b972f1e991e5a46, type: 3}
|
- {fileID: 7400000, guid: 6e73cca667dfcd4499c84d1b6ba9d531, type: 2}
|
||||||
- {fileID: -7717634560727564301, guid: 4005a77aa7d531742b1de1bec27001b1, type: 3}
|
- {fileID: 7400000, guid: ace5d7e8f405a8846b98bb956f0a9313, type: 2}
|
||||||
- {fileID: -8265974341663887746, guid: d3e4690f866332b43b86ee7005291cd0, type: 3}
|
- {fileID: 7400000, guid: 006b9541ce7dcb3469d79f9d9df3d6df, type: 2}
|
||||||
- {fileID: 712281148059590495, guid: b590c58b50c3b554687b172862fa5d9d, type: 3}
|
- {fileID: 7400000, guid: 0b70d6464b876144c84f2410c0359a4f, type: 2}
|
||||||
- {fileID: 6888780564265376159, guid: 827dfeae95fdf6b41b78698f2e846b5f, type: 3}
|
- {fileID: 7400000, guid: e35d6eb3ae2c5a146801c9dd399acd52, type: 2}
|
||||||
- {fileID: -8752051743343580635, guid: 5eaeca917bbeb494eb14ad0e0552c42f, type: 3}
|
- {fileID: 7400000, guid: 4ff85a68bb491e143a001f3af82639ed, type: 2}
|
||||||
- {fileID: 7400000, guid: c8fdea7dee0c6f04bbd27fe565071682, type: 2}
|
- {fileID: 7400000, guid: c8fdea7dee0c6f04bbd27fe565071682, type: 2}
|
||||||
debugMode: 1
|
debugMode: 1
|
||||||
showAreaDebug: 1
|
showAreaDebug: 1
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ namespace Colosseum.Skills
|
|||||||
[SerializeField] private AnimationClip baseSkillClip;
|
[SerializeField] private AnimationClip baseSkillClip;
|
||||||
|
|
||||||
[Header("네트워크 동기화")]
|
[Header("네트워크 동기화")]
|
||||||
[Tooltip("\"_Player_\" 이름이 포함된 클립이 자동 등록됩니다. 서버→클라이언트 클립 동기화에 사용됩니다.")]
|
[Tooltip("이 이름이 포함된 클립이 자동 등록됩니다. 서버→클라이언트 클립 동기화에 사용됩니다.")]
|
||||||
|
[SerializeField] private string clipAutoRegisterFilter = "_Player_";
|
||||||
|
[Tooltip("자동 등록된 클립 목록 (서버→클라이언트 클립 인덱스 동기화용)")]
|
||||||
[SerializeField] private List<AnimationClip> registeredClips = new();
|
[SerializeField] private List<AnimationClip> registeredClips = new();
|
||||||
|
|
||||||
[Header("설정")]
|
[Header("설정")]
|
||||||
@@ -110,15 +112,19 @@ namespace Colosseum.Skills
|
|||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
private void OnValidate()
|
private void OnValidate()
|
||||||
{
|
{
|
||||||
AutoRegisterPlayerClips();
|
AutoRegisterClips();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "_Player_"가 포함된 모든 AnimationClip을 registeredClips에 자동 등록합니다.
|
/// clipAutoRegisterFilter 이름이 포함된 모든 AnimationClip을 registeredClips에 자동 등록합니다.
|
||||||
/// 서버→클라이언트 클립 동기화 인덱스의 일관성을 위해 이름순으로 정렬합니다.
|
/// 서버→클라이언트 클립 동기화 인덱스의 일관성을 위해 이름순으로 정렬합니다.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void AutoRegisterPlayerClips()
|
private void AutoRegisterClips()
|
||||||
{
|
{
|
||||||
|
string trimmedFilter = clipAutoRegisterFilter.Trim('_');
|
||||||
|
if (string.IsNullOrEmpty(trimmedFilter))
|
||||||
|
return;
|
||||||
|
|
||||||
string[] guids = AssetDatabase.FindAssets("t:AnimationClip", new[] { "Assets/_Game/Animations" });
|
string[] guids = AssetDatabase.FindAssets("t:AnimationClip", new[] { "Assets/_Game/Animations" });
|
||||||
var clips = new List<AnimationClip>();
|
var clips = new List<AnimationClip>();
|
||||||
|
|
||||||
@@ -127,7 +133,7 @@ namespace Colosseum.Skills
|
|||||||
string path = AssetDatabase.GUIDToAssetPath(guid);
|
string path = AssetDatabase.GUIDToAssetPath(guid);
|
||||||
string clipName = Path.GetFileNameWithoutExtension(path);
|
string clipName = Path.GetFileNameWithoutExtension(path);
|
||||||
|
|
||||||
if (clipName.IndexOf("_Player_", StringComparison.OrdinalIgnoreCase) >= 0)
|
if (clipName.IndexOf(trimmedFilter, StringComparison.OrdinalIgnoreCase) >= 0)
|
||||||
{
|
{
|
||||||
AnimationClip clip = AssetDatabase.LoadAssetAtPath<AnimationClip>(path);
|
AnimationClip clip = AssetDatabase.LoadAssetAtPath<AnimationClip>(path);
|
||||||
if (clip != null)
|
if (clip != null)
|
||||||
@@ -155,7 +161,7 @@ namespace Colosseum.Skills
|
|||||||
{
|
{
|
||||||
registeredClips.Clear();
|
registeredClips.Clear();
|
||||||
registeredClips.AddRange(clips);
|
registeredClips.AddRange(clips);
|
||||||
Debug.Log($"[SkillController] 자동 등록: {clips.Count}개 Player 클립", this);
|
Debug.Log($"[SkillController] 자동 등록: {clips.Count}개 클립 (필터: {clipAutoRegisterFilter})", this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user