각종 경고 수정

This commit is contained in:
2026-01-22 18:13:20 +09:00
parent 24e362a0ad
commit 2eec0f497d
5 changed files with 7 additions and 13 deletions

View File

@@ -88,14 +88,16 @@ public class MineableBlock : NetworkBehaviour, IDamageable
_health.OnDeath += HandleDeath;
}
}
void OnDestroy()
public override void OnDestroy() // 1. override 키워드 추가
{
if (_health != null)
{
_health.OnDamaged -= HandleDamaged;
_health.OnDeath -= HandleDeath;
}
// 2. 부모 클래스 실행
base.OnDestroy();
}
public override void OnNetworkSpawn()