Unity 6.5 업그레이드와 신규 프로토타입 기반 구축
This commit is contained in:
@@ -21,10 +21,6 @@ namespace Northbound
|
||||
[Tooltip("Death trigger parameter name in Animator")]
|
||||
public string dieTriggerParam = "Die";
|
||||
|
||||
[Header("Settings")]
|
||||
[Tooltip("Auto-load animator controller from MonsterData")]
|
||||
public bool autoLoadFromMonsterData = true;
|
||||
|
||||
[Tooltip("Debug logging")]
|
||||
public bool debugLogging = false;
|
||||
|
||||
@@ -60,10 +56,6 @@ namespace Northbound
|
||||
_enemyUnit.OnDeath += HandleDeath;
|
||||
}
|
||||
|
||||
if (autoLoadFromMonsterData)
|
||||
{
|
||||
LoadAnimatorController();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnNetworkDespawn()
|
||||
@@ -95,29 +87,6 @@ namespace Northbound
|
||||
Debug.Log($"[MonsterAnimationController] Triggered death animation (killer: {killerId})", this);
|
||||
}
|
||||
|
||||
private void LoadAnimatorController()
|
||||
{
|
||||
var monsterDataComponent = GetComponent<MonsterDataComponent>();
|
||||
if (monsterDataComponent != null && monsterDataComponent.monsterData != null)
|
||||
{
|
||||
string animatorPath = monsterDataComponent.monsterData.animationControllerPath;
|
||||
if (!string.IsNullOrEmpty(animatorPath))
|
||||
{
|
||||
RuntimeAnimatorController controller = Resources.Load<RuntimeAnimatorController>(animatorPath);
|
||||
if (controller != null)
|
||||
{
|
||||
_animator.runtimeAnimatorController = controller;
|
||||
if (debugLogging)
|
||||
Debug.Log($"[MonsterAnimationController] Loaded animator from {animatorPath}", this);
|
||||
}
|
||||
else if (debugLogging)
|
||||
{
|
||||
Debug.LogWarning($"[MonsterAnimationController] Could not load animator from {animatorPath}", this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!IsSpawned) return;
|
||||
|
||||
Reference in New Issue
Block a user