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