[UI] UI 컴포넌트 디버그 로그 제거

AbnormalityListUI, AbnormalitySlotUI, PlayerHUD, SkillSlotUI에서 불필요한 디버그 로그 제거

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-03-12 03:00:12 +09:00
parent 2f90e8e354
commit 2079e1b232
4 changed files with 6 additions and 76 deletions

View File

@@ -42,8 +42,6 @@ namespace Colosseum.UI
private void Start() private void Start()
{ {
Debug.Log("[AbnormalityListUI] Start() called");
if (autoFindPlayer) if (autoFindPlayer)
{ {
// 로컬 플레이어 찾기 // 로컬 플레이어 찾기
@@ -52,10 +50,6 @@ namespace Colosseum.UI
// 슬롯 풀 초기화 // 슬롯 풀 초기화
InitializeSlotPool(); InitializeSlotPool();
Debug.Log($"[AbnormalityListUI] slotPrefab: {(slotPrefab != null ? slotPrefab.name : "NULL")}");
Debug.Log($"[AbnormalityListUI] buffContainer: {(buffContainer != null ? buffContainer.name : "NULL")}");
Debug.Log($"[AbnormalityListUI] debuffContainer: {(debuffContainer != null ? debuffContainer.name : "NULL")}");
} }
private void OnDestroy() private void OnDestroy()
@@ -90,17 +84,14 @@ namespace Colosseum.UI
private void FindLocalPlayer() private void FindLocalPlayer()
{ {
var playerObjects = FindObjectsByType<AbnormalityManager>(FindObjectsSortMode.None); var playerObjects = FindObjectsByType<AbnormalityManager>(FindObjectsSortMode.None);
Debug.Log($"[AbnormalityListUI] Found {playerObjects.Length} AbnormalityManager(s)");
foreach (var manager in playerObjects) foreach (var manager in playerObjects)
{ {
// 네트워크 오브젝트인 경우 로컬 플레이어 확인 // 네트워크 오브젝트인 경우 로컬 플레이어 확인
if (manager.TryGetComponent<Unity.Netcode.NetworkObject>(out var netObj)) if (manager.TryGetComponent<Unity.Netcode.NetworkObject>(out var netObj))
{ {
Debug.Log($"[AbnormalityListUI] Checking {manager.gameObject.name}, IsOwner: {netObj.IsOwner}");
if (netObj.IsOwner) if (netObj.IsOwner)
{ {
Debug.Log($"[AbnormalityListUI] Setting target to local player: {manager.gameObject.name}");
SetTarget(manager); SetTarget(manager);
return; return;
} }
@@ -111,13 +102,8 @@ namespace Colosseum.UI
// 첫 번째 플레이어 사용 (싱글플레이어용) // 첫 번째 플레이어 사용 (싱글플레이어용)
if (playerObjects.Length > 0) if (playerObjects.Length > 0)
{ {
Debug.Log($"[AbnormalityListUI] No local player found, using first manager: {playerObjects[0].gameObject.name}");
SetTarget(playerObjects[0]); SetTarget(playerObjects[0]);
} }
else
{
Debug.LogWarning("[AbnormalityListUI] No AbnormalityManager found!");
}
} }
/// <summary> /// <summary>
@@ -126,8 +112,6 @@ namespace Colosseum.UI
/// <param name="manager">추적할 AbnormalityManager</param> /// <param name="manager">추적할 AbnormalityManager</param>
public void SetTarget(AbnormalityManager manager) public void SetTarget(AbnormalityManager manager)
{ {
Debug.Log($"[AbnormalityListUI] SetTarget called with: {(manager != null ? manager.gameObject.name : "null")}");
// 기존 구독 해제 // 기존 구독 해제
if (targetManager != null) if (targetManager != null)
{ {
@@ -144,7 +128,6 @@ namespace Colosseum.UI
targetManager.OnAbnormalityAdded += OnAbnormalityAdded; targetManager.OnAbnormalityAdded += OnAbnormalityAdded;
targetManager.OnAbnormalityRemoved += OnAbnormalityRemoved; targetManager.OnAbnormalityRemoved += OnAbnormalityRemoved;
targetManager.OnAbnormalitiesChanged += OnAbnormalitiesChanged; targetManager.OnAbnormalitiesChanged += OnAbnormalitiesChanged;
Debug.Log("[AbnormalityListUI] Events subscribed successfully");
} }
// 즉시 UI 갱신 // 즉시 UI 갱신
@@ -156,11 +139,7 @@ namespace Colosseum.UI
/// </summary> /// </summary>
private void InitializeSlotPool() private void InitializeSlotPool()
{ {
if (slotPrefab == null) if (slotPrefab == null) return;
{
Debug.LogWarning("[AbnormalityListUI] Slot prefab is not assigned");
return;
}
// 필요한 만큼 슬롯 미리 생성 // 필요한 만큼 슬롯 미리 생성
for (int i = 0; i < maxSlots; i++) for (int i = 0; i < maxSlots; i++)
@@ -219,7 +198,6 @@ namespace Colosseum.UI
/// </summary> /// </summary>
private void OnAbnormalityAdded(ActiveAbnormality abnormality) private void OnAbnormalityAdded(ActiveAbnormality abnormality)
{ {
Debug.Log($"[AbnormalityListUI] OnAbnormalityAdded event received: {abnormality.Data.abnormalityName}");
ForceRefreshUI(); ForceRefreshUI();
} }
@@ -228,7 +206,6 @@ namespace Colosseum.UI
/// </summary> /// </summary>
private void OnAbnormalityRemoved(ActiveAbnormality abnormality) private void OnAbnormalityRemoved(ActiveAbnormality abnormality)
{ {
Debug.Log($"[AbnormalityListUI] OnAbnormalityRemoved event received: {abnormality.Data.abnormalityName}");
ForceRefreshUI(); ForceRefreshUI();
} }
@@ -237,7 +214,6 @@ namespace Colosseum.UI
/// </summary> /// </summary>
private void OnAbnormalitiesChanged() private void OnAbnormalitiesChanged()
{ {
Debug.Log("[AbnormalityListUI] OnAbnormalitiesChanged event received");
ForceRefreshUI(); ForceRefreshUI();
} }
@@ -246,11 +222,7 @@ namespace Colosseum.UI
/// </summary> /// </summary>
public void ForceRefreshUI() public void ForceRefreshUI()
{ {
if (targetManager == null) if (targetManager == null) return;
{
Debug.LogWarning("[AbnormalityListUI] ForceRefreshUI called but targetManager is null");
return;
}
// 모든 슬롯 반환 // 모든 슬롯 반환
foreach (var slot in activeSlots.ToArray()) foreach (var slot in activeSlots.ToArray())
@@ -262,23 +234,16 @@ namespace Colosseum.UI
// 활성화된 이상 상태 표시 // 활성화된 이상 상태 표시
var abnormalities = targetManager.ActiveAbnormalities; var abnormalities = targetManager.ActiveAbnormalities;
Debug.Log($"[AbnormalityListUI] ForceRefreshUI: {abnormalities.Count} abnormalities found");
foreach (var abnormality in abnormalities) foreach (var abnormality in abnormalities)
{ {
var slot = GetSlot(); var slot = GetSlot();
if (slot == null) if (slot == null) continue;
{
Debug.LogWarning("[AbnormalityListUI] Could not get slot from pool");
continue;
}
// 버프/디버프에 따라 적절한 컨테이너에 배치 // 버프/디버프에 따라 적절한 컨테이너에 배치
Transform container = abnormality.Data.isDebuff ? debuffContainer : buffContainer; Transform container = abnormality.Data.isDebuff ? debuffContainer : buffContainer;
if (container == null) container = transform; if (container == null) container = transform;
Debug.Log($"[AbnormalityListUI] Adding slot for: {abnormality.Data.abnormalityName}, isDebuff: {abnormality.Data.isDebuff}, container: {container.name}");
slot.transform.SetParent(container, false); slot.transform.SetParent(container, false);
slot.Initialize(abnormality); slot.Initialize(abnormality);
slot.gameObject.SetActive(true); slot.gameObject.SetActive(true);

View File

@@ -49,14 +49,7 @@ namespace Colosseum.UI
{ {
trackedAbnormality = abnormality; trackedAbnormality = abnormality;
if (abnormality?.Data == null) if (abnormality?.Data == null) return;
{
Debug.LogWarning("[AbnormalitySlotUI] Initialize called with null abnormality or data");
return;
}
Debug.Log($"[AbnormalitySlotUI] Initialize: {abnormality.Data.abnormalityName}, icon: {abnormality.Data.icon?.name ?? "null"}");
Debug.Log($"[AbnormalitySlotUI] UI References - iconImage: {(iconImage != null ? "OK" : "NULL")}, durationFill: {(durationFill != null ? "OK" : "NULL")}, durationText: {(durationText != null ? "OK" : "NULL")}, backgroundImage: {(backgroundImage != null ? "OK" : "NULL")}");
// Cooltime 요소 활성화 (부모 게임오브젝트들이 비활성화되어 있을 수 있음) // Cooltime 요소 활성화 (부모 게임오브젝트들이 비활성화되어 있을 수 있음)
EnableDurationElements(); EnableDurationElements();
@@ -74,11 +67,6 @@ namespace Colosseum.UI
effectNameText.text = abnormality.Data.abnormalityName; effectNameText.text = abnormality.Data.abnormalityName;
} }
else
{
Debug.LogWarning("[AbnormalitySlotUI] effectNameText is null");
}
// 배경 색상 설정 (버프/디버프 구분) // 배경 색상 설정 (버프/디버프 구분)
if (backgroundImage != null) if (backgroundImage != null)
{ {

View File

@@ -44,11 +44,8 @@ namespace Colosseum.UI
private void FindLocalPlayer() private void FindLocalPlayer()
{ {
var players = FindObjectsByType<PlayerNetworkController>(FindObjectsSortMode.None); foreach (var player in FindObjectsByType<PlayerNetworkController>(FindObjectsSortMode.None))
Debug.Log($"[PlayerHUD] Finding player... found {players.Length} players");
foreach (var player in players)
{ {
Debug.Log($"[PlayerHUD] Player {player.OwnerClientId}: IsOwner={player.IsOwner}, IsSpawned={player.IsSpawned}");
if (player.IsOwner) if (player.IsOwner)
{ {
SetTarget(player); SetTarget(player);
@@ -62,8 +59,6 @@ namespace Colosseum.UI
/// </summary> /// </summary>
public void SetTarget(PlayerNetworkController player) public void SetTarget(PlayerNetworkController player)
{ {
Debug.Log($"[PlayerHUD] SetTarget called: {(player != null ? $"Player {player.OwnerClientId}" : "null")}");
// 이전 타겟 구독 해제 // 이전 타겟 구독 해제
UnsubscribeFromEvents(); UnsubscribeFromEvents();
@@ -74,8 +69,6 @@ namespace Colosseum.UI
// 초기 값 설정 // 초기 값 설정
UpdateStatBars(); UpdateStatBars();
Debug.Log($"[PlayerHUD] Initial HP: {targetPlayer?.Health}/{targetPlayer?.MaxHealth}, MP: {targetPlayer?.Mana}/{targetPlayer?.MaxMana}");
} }
private void SubscribeToEvents() private void SubscribeToEvents()
@@ -112,31 +105,17 @@ namespace Colosseum.UI
private void UpdateStatBars() private void UpdateStatBars()
{ {
if (targetPlayer == null) if (targetPlayer == null) return;
{
Debug.Log("[PlayerHUD] UpdateStatBars: targetPlayer is null");
return;
}
Debug.Log($"[PlayerHUD] UpdateStatBars: HP={targetPlayer.Health}/{targetPlayer.MaxHealth}, MP={targetPlayer.Mana}/{targetPlayer.MaxMana}");
if (healthBar != null) if (healthBar != null)
{ {
healthBar.SetValue(targetPlayer.Health, targetPlayer.MaxHealth); healthBar.SetValue(targetPlayer.Health, targetPlayer.MaxHealth);
} }
else
{
Debug.LogWarning("[PlayerHUD] healthBar is null!");
}
if (manaBar != null) if (manaBar != null)
{ {
manaBar.SetValue(targetPlayer.Mana, targetPlayer.MaxMana); manaBar.SetValue(targetPlayer.Mana, targetPlayer.MaxMana);
} }
else
{
Debug.LogWarning("[PlayerHUD] manaBar is null!");
}
} }
} }
} }

View File

@@ -86,8 +86,6 @@ namespace Colosseum.UI
{ {
iconImage.enabled = false; iconImage.enabled = false;
} }
Debug.Log($"[SkillSlotUI] Init slot {index}: skill={skillData?.SkillName}, useIcon={useIconForCooldown}");
} }
public void UpdateState(float cooldownRemaining, float cooldownTotal, bool hasEnoughMana) public void UpdateState(float cooldownRemaining, float cooldownTotal, bool hasEnoughMana)