diff --git a/Assets/Scenes/GameMain/NavMesh-Primitive_Floor.asset b/Assets/Scenes/GameMain/NavMesh-Primitive_Floor.asset index fd2ec95..8a6e2f8 100644 Binary files a/Assets/Scenes/GameMain/NavMesh-Primitive_Floor.asset and b/Assets/Scenes/GameMain/NavMesh-Primitive_Floor.asset differ diff --git a/Assets/Scripts/AutoTargetSystem.cs b/Assets/Scripts/AutoTargetSystem.cs index ccd43ef..f5132cb 100644 --- a/Assets/Scripts/AutoTargetSystem.cs +++ b/Assets/Scripts/AutoTargetSystem.cs @@ -41,16 +41,6 @@ namespace Northbound { _building = GetComponent(); _teamMember = GetComponent(); - - if (_building == null) - { - Debug.LogError($"[AutoTargetSystem] {gameObject.name}에 Building 컴포넌트가 없습니다!"); - } - - if (_teamMember == null) - { - Debug.LogError($"[AutoTargetSystem] {gameObject.name}에 ITeamMember 컴포넌트가 없습니다!"); - } } private void Update() @@ -72,10 +62,9 @@ namespace Northbound // 범위 내 모든 콜라이더 탐지 Collider[] colliders = Physics.OverlapSphere(transform.position, detectionRange, targetLayer); - + if (showDebugInfo && colliders.Length > 0) { - Debug.Log($"[AutoTarget] {gameObject.name}이(가) {colliders.Length}개의 오브젝트를 감지했습니다."); } GameObject closestEnemy = null; @@ -100,21 +89,16 @@ namespace Northbound } } - if (targetTeam == null) - { - if (showDebugInfo) - { - Debug.Log($"[AutoTarget] {col.gameObject.name}에 ITeamMember가 없습니다."); - } - continue; - } + if (targetTeam == null) + { + continue; + } // 적대 관계 확인 bool canAttack = TeamManager.CanAttack(_teamMember, targetTeam); - + if (showDebugInfo) { - Debug.Log($"[AutoTarget] {gameObject.name} ({TeamManager.GetTeamName(_teamMember.GetTeam())}) → {col.gameObject.name} ({TeamManager.GetTeamName(targetTeam.GetTeam())}): 공격가능={canAttack}"); } if (!canAttack) @@ -153,22 +137,14 @@ namespace Northbound _lastAttackTime = Time.time; // 모든 클라이언트에 빔 효과 표시 - ShowAttackBeamClientRpc(beamStart, beamEnd); - - var targetTeam = closestEnemy.GetComponent() ?? - closestEnemy.GetComponentInParent() ?? - closestEnemy.GetComponentInChildren(); - - Debug.Log($"[AutoTarget] {gameObject.name} ({TeamManager.GetTeamName(_teamMember.GetTeam())})이(가) {closestEnemy.name} ({TeamManager.GetTeamName(targetTeam?.GetTeam() ?? TeamType.Neutral)})을(를) 공격! (거리: {closestDistance:F2}m, 데미지: {attackDamage})"); + ShowAttackBeamClientRpc(beamStart, beamEnd); } else { - Debug.LogWarning($"[AutoTarget] {closestEnemy.name}에 IDamageable이 없습니다."); } } else if (showDebugInfo && colliders.Length > 0) { - Debug.Log($"[AutoTarget] {gameObject.name}이(가) 공격 가능한 적을 찾지 못했습니다."); } } diff --git a/Assets/Scripts/BuildingPlacement.cs b/Assets/Scripts/BuildingPlacement.cs index 0a04737..da7bc3e 100644 --- a/Assets/Scripts/BuildingPlacement.cs +++ b/Assets/Scripts/BuildingPlacement.cs @@ -200,15 +200,6 @@ namespace Northbound DestroyPreview(); ClearDragPreviews(); } - - Debug.Log($"[BuildingPlacement] 건설 모드 {(isBuildModeActive ? "활성화" : "비활성화")}"); - Debug.Log($"[BuildingPlacement] Preview object: {(previewObject != null ? "CREATED" : "NULL")}"); - if (previewObject != null) - { - Debug.Log($"[BuildingPlacement] Preview position: {previewObject.transform.position}"); - Debug.Log($"[BuildingPlacement] Preview scale: {previewObject.transform.localScale}"); - Debug.Log($"[BuildingPlacement] Preview active: {previewObject.activeSelf}"); - } } /// @@ -240,7 +231,6 @@ namespace Northbound CreatePreview(); } - Debug.Log($"[BuildingPlacement] 건물 선택됨: {BuildingManager.Instance.availableBuildings[index].buildingName}"); } private void CreatePreview() @@ -251,10 +241,6 @@ namespace Northbound return; } - Debug.Log($"[BuildingPlacement] Creating preview..."); - Debug.Log($"[BuildingPlacement] BuildingManager.availableBuildings.Count: {BuildingManager.Instance.availableBuildings.Count}"); - Debug.Log($"[BuildingPlacement] selectedBuildingIndex: {selectedBuildingIndex}"); - if (selectedBuildingIndex < 0 || selectedBuildingIndex >= BuildingManager.Instance.availableBuildings.Count) { Debug.LogWarning($"[BuildingPlacement] 유효하지 않은 건물 인덱스: {selectedBuildingIndex}"); @@ -274,9 +260,6 @@ namespace Northbound return; } - Debug.Log($"[BuildingPlacement] TowerData: {data.buildingName}, Prefab: {data.prefab.name}"); - Debug.Log($"[BuildingPlacement] Prefab scale: {data.prefab.transform.localScale}"); - // 완성 건물 프리팹으로 프리뷰 생성 (사용자가 완성 모습을 볼 수 있도록) previewObject = Instantiate(data.prefab); @@ -318,7 +301,6 @@ namespace Northbound obstacle.enabled = false; } - Debug.Log($"[BuildingPlacement] 프리뷰 생성됨: {data.buildingName}"); } private void DestroyPreview() diff --git a/Assets/Scripts/CreepCamp.cs b/Assets/Scripts/CreepCamp.cs index 06497cc..8d7532a 100644 --- a/Assets/Scripts/CreepCamp.cs +++ b/Assets/Scripts/CreepCamp.cs @@ -76,7 +76,6 @@ namespace Northbound { if (creepPrefabs.Count == 0) { - Debug.LogWarning($"[CreepCamp] No creep prefabs assigned!"); return; } @@ -91,14 +90,12 @@ namespace Northbound GameObject selectedCreep = SelectCreepByCost(remainingCost); if (selectedCreep == null) { - Debug.LogWarning($"[CreepCamp] No affordable creeps. Remaining cost: {remainingCost:F2}"); break; } CreepData creepData = GetCreepDataFromPrefab(selectedCreep); if (creepData == null) { - Debug.LogWarning($"[CreepCamp] Could not get creep data from {selectedCreep.name}"); continue; } @@ -106,8 +103,6 @@ namespace Northbound remainingCost -= creepData.cost; spawnedCount++; } - - Debug.Log($"[CreepCamp] Spawned {spawnedCount} creeps (Cost budget: {_campCostBudget * _campStrength:F2}, Used: {(_campCostBudget * _campStrength) - remainingCost:F2})"); } private GameObject SelectCreepByCost(float remainingCost) @@ -179,7 +174,6 @@ namespace Northbound { if (resourcePickupPrefab == null) { - Debug.LogWarning($"[CreepCamp] No resource pickup prefab assigned!"); return; } @@ -188,7 +182,6 @@ namespace Northbound _resourcePickup = pickup.GetComponent(); if (_resourcePickup == null) { - Debug.LogError($"[CreepCamp] ResourcePickup component not found on prefab!"); Destroy(pickup); return; } @@ -207,8 +200,6 @@ namespace Northbound // 비활성화는 ServerRpc를 통해 처리 DisablePickupClientRpc(); - - Debug.Log($"[CreepCamp] Resource pickup spawned (Amount: {_resourcePickup.resourceAmount})"); } private void HandleCreepDeath(EnemyUnit deadCreep) @@ -226,13 +217,10 @@ namespace Northbound // 리스트에서 해당 creep 제거 _spawnedCreeps.Remove(deadCreep); - Debug.Log($"[CreepCamp] Creep died. Remaining creeps: {_spawnedCreeps.Count}"); - // 모든 creep이 처치되었으면 ResourcePickup 활성화 if (_spawnedCreeps.Count == 0 && _resourcePickup != null) { EnableResourcePickupClientRpc(); - Debug.Log($"[CreepCamp] All creeps defeated! Resource pickup enabled."); } } @@ -297,10 +285,6 @@ namespace Northbound _deathHandlers[enemyUnit] = handler; enemyUnit.OnDeath += handler; } - else - { - Debug.LogWarning($"[CreepCamp] EnemyUnit component not found on creep prefab {prefab.name}"); - } networkObj.SpawnWithOwnership(NetworkManager.Singleton.LocalClientId); } diff --git a/Assets/Scripts/CreepDataComponent.cs b/Assets/Scripts/CreepDataComponent.cs index 2a5debb..8dd0e66 100644 --- a/Assets/Scripts/CreepDataComponent.cs +++ b/Assets/Scripts/CreepDataComponent.cs @@ -31,7 +31,6 @@ namespace Northbound { if (creepData == null) { - Debug.LogWarning("[CreepDataComponent] creepData is null", this); return; } diff --git a/Assets/Scripts/EnemyAIController.cs b/Assets/Scripts/EnemyAIController.cs index b21e3c6..6c4ba8b 100644 --- a/Assets/Scripts/EnemyAIController.cs +++ b/Assets/Scripts/EnemyAIController.cs @@ -101,16 +101,15 @@ namespace Northbound _agent.acceleration = 8f; _agent.angularSpeed = 120f; _agent.stoppingDistance = attackRange * 0.7f; - _agent.autoBraking = true; - _agent.updateRotation = true; - _agent.updateUpAxis = false; - - if (!_agent.isOnNavMesh) - { - Debug.LogWarning($"[EnemyAI] {gameObject.name}이(가) NavMesh 위에 있지 않습니다!"); - } - - if (aiType == TeamType.Monster) + _agent.autoBraking = true; + _agent.updateRotation = true; + _agent.updateUpAxis = false; + + if (!_agent.isOnNavMesh) + { + } + + if (aiType == TeamType.Monster) { FindCore(); TransitionToState(EnemyAIState.MoveToCore); @@ -248,7 +247,7 @@ namespace Northbound GameObject target = GetTargetPlayer(); if (target == null) { - if (showDebugInfo) Debug.Log("[EnemyAI] 타겟 상실 - 상태 해제"); + if (showDebugInfo) {} OnLostTarget(); return; } @@ -417,19 +416,11 @@ namespace Northbound { damageable.TakeDamage(attackDamage, NetworkObjectId); _lastAttackTime = Time.time; - OnAttackPerformed?.Invoke(target); - - if (showDebugInfo) - Debug.Log($"[EnemyAI] {gameObject.name} -> {target.name} 타격 성공! (데미지: {attackDamage})"); } } else { - // 3. 만약 IDamageable을 못 찾았다면 로그를 남겨서 범인을 찾습니다. - if (showDebugInfo) - Debug.LogWarning($"[EnemyAI] {target.name}에 IDamageable 스크립트가 없습니다!"); - // 공격할 수 없는 대상이면 상태를 해제합니다. OnLostTarget(); } @@ -504,9 +495,9 @@ namespace Northbound // 사망 상태로 전환 TransitionToState(EnemyAIState.Dead); ClearTargetPlayer(); - + if (showDebugInfo) - Debug.Log($"[EnemyAI] {gameObject.name}이(가) 사망했습니다. (killer: {killerId})"); + {} } private void OnLostTarget() diff --git a/Assets/Scripts/EnemyPortal.cs b/Assets/Scripts/EnemyPortal.cs index 53cbc26..8bbc00e 100644 --- a/Assets/Scripts/EnemyPortal.cs +++ b/Assets/Scripts/EnemyPortal.cs @@ -65,8 +65,6 @@ using UnityEngine; { _team.Value = portalTeam; } - - Debug.Log($"[EnemyPortal] 포털 스폰됨 (팀: {TeamManager.GetTeamName(_team.Value)}, 체력: {_currentHealth.Value}/{maxHealth})"); } GlobalTimer.Instance.OnCycleStart += OnCycleStart; @@ -104,7 +102,6 @@ using UnityEngine; if (monsterData == null) { - Debug.LogWarning($"[EnemyPortal] Could not find MonsterData on {selectedEntry.prefab.name}"); continue; } @@ -121,11 +118,6 @@ using UnityEngine; remainingCost -= monsterData.cost; spawnedCount++; } - - if (spawnedCount > 0) - { - Debug.Log($"[EnemyPortal] Spawned {spawnedCount} monsters (Cost used: {currentCost - remainingCost:F2})"); - } } private bool CanSpawnAnyMonster(float remainingCost) @@ -200,8 +192,6 @@ using UnityEngine; var netObj = enemy.GetComponent(); netObj.Spawn(true); - - Debug.Log($"[EnemyPortal] {enemy.name} 스폰됨 - OwnerClientId: {netObj.OwnerClientId}, IsServer: {IsServer}"); } private void IncreaseCost() @@ -238,7 +228,6 @@ using UnityEngine; { if (!TeamManager.CanAttack(attackerTeamMember, this)) { - Debug.Log($"[EnemyPortal] {TeamManager.GetTeamName(attackerTeamMember.GetTeam())} 팀은 {TeamManager.GetTeamName(_team.Value)} 팀 포털을 공격할 수 없습니다."); return; } } @@ -248,8 +237,6 @@ using UnityEngine; int actualDamage = Mathf.Min(damage, _currentHealth.Value); _currentHealth.Value -= actualDamage; - Debug.Log($"[EnemyPortal] 포털이 {actualDamage} 데미지를 받았습니다. 남은 체력: {_currentHealth.Value}/{maxHealth}"); - // 데미지 이펙트 ShowDamageEffectClientRpc(); @@ -264,8 +251,6 @@ using UnityEngine; { if (!IsServer) return; - Debug.Log($"[EnemyPortal] 포털이 파괴되었습니다! (공격자: {attackerId})"); - // 파괴 이펙트 ShowDestroyEffectClientRpc(); diff --git a/Assets/Scripts/EnemyUnit.cs b/Assets/Scripts/EnemyUnit.cs index 972ad46..9edb060 100644 --- a/Assets/Scripts/EnemyUnit.cs +++ b/Assets/Scripts/EnemyUnit.cs @@ -75,9 +75,7 @@ namespace Northbound int actualDamage = Mathf.Min(damage, _currentHealth.Value); _currentHealth.Value -= actualDamage; - - Debug.Log($"[EnemyUnit] 적 유닛이 {actualDamage} 데미지를 받았습니다. 남은 체력: {_currentHealth.Value}/{maxHealth}"); - + // 데미지 이펙트 ShowDamageEffectClientRpc(); diff --git a/Assets/Scripts/FogOfWarRenderer.cs b/Assets/Scripts/FogOfWarRenderer.cs index d4d3ee3..9aa4aa0 100644 --- a/Assets/Scripts/FogOfWarRenderer.cs +++ b/Assets/Scripts/FogOfWarRenderer.cs @@ -39,7 +39,6 @@ namespace Northbound // NetworkManager 준비 대기 if (NetworkManager.Singleton == null || !NetworkManager.Singleton.IsClient) { - Debug.LogWarning("[FogOfWar] NetworkManager가 준비되지 않았습니다. 대기 중..."); return; } @@ -55,7 +54,6 @@ namespace Northbound var fogSystem = FogOfWarSystem.Instance; if (fogSystem == null) { - Debug.LogError("[FogOfWar] FogOfWarSystem을 찾을 수 없습니다! 씬에 FogOfWarSystem GameObject가 있는지 확인하세요."); return; } @@ -84,10 +82,6 @@ namespace Northbound instanceMaterial.mainTexture = _fogTexture; _meshRenderer.material = instanceMaterial; } - else - { - Debug.LogWarning("[FogOfWar] Fog Material이 설정되지 않았습니다!"); - } #if UNITY_EDITOR if (fogSystem.disableInEditor) @@ -98,12 +92,11 @@ namespace Northbound // 렌더링 레이어 설정 gameObject.layer = LayerMask.NameToLayer("UI"); // 또는 별도 레이어 생성 - + // 메쉬 생성 CreatePlaneMesh(fogSystem); _isInitialized = true; - Debug.Log($"[FogOfWar] 렌더러 초기화 완료 (Client {_localClientId})"); } private void Update() @@ -255,8 +248,6 @@ namespace Northbound meshFilter.mesh = mesh; transform.position = fogSystem.worldOrigin; - - Debug.Log($"[FogOfWar] Plane Mesh 생성 완료: {width}x{height} at {fogSystem.worldOrigin}"); } private void OnDestroy() diff --git a/Assets/Scripts/FogOfWarSystem.cs b/Assets/Scripts/FogOfWarSystem.cs index e99db4d..9614238 100644 --- a/Assets/Scripts/FogOfWarSystem.cs +++ b/Assets/Scripts/FogOfWarSystem.cs @@ -256,19 +256,17 @@ namespace Northbound { // 클라이언트는 로컬 데이터 초기화 _localFogData = new FogOfWarData(gridWidth, gridHeight); - Debug.Log($"[FogOfWar] 클라이언트 {NetworkManager.LocalClientId} 초기화"); } } private void OnClientConnected(ulong clientId) { if (!IsServer) return; - + // Ensure fog data exists for this client if (!_serverFogData.ContainsKey(clientId)) { _serverFogData[clientId] = new FogOfWarData(gridWidth, gridHeight); - Debug.Log($"[FogOfWar] 클라이언트 {clientId} 안개 데이터 초기화"); } } diff --git a/Assets/Scripts/FogOfWarVisibility.cs b/Assets/Scripts/FogOfWarVisibility.cs index 621d60f..e1e8298 100644 --- a/Assets/Scripts/FogOfWarVisibility.cs +++ b/Assets/Scripts/FogOfWarVisibility.cs @@ -53,7 +53,7 @@ namespace Northbound if (renderers == null || renderers.Length == 0) { - Debug.LogWarning($"[FogOfWarVisibility] {gameObject.name}: No renderers found! Component will not work."); + // Debug.LogWarning($"[FogOfWarVisibility] {gameObject.name}: No renderers found! Component will not work."); return; } diff --git a/Assets/Scripts/GlobalTimer.cs b/Assets/Scripts/GlobalTimer.cs index 1a0a743..536a01a 100644 --- a/Assets/Scripts/GlobalTimer.cs +++ b/Assets/Scripts/GlobalTimer.cs @@ -104,9 +104,6 @@ namespace Northbound _hasReachedHalfway = true; OnHalfwayPoint?.Invoke(cycleLength / 2f); NotifyHalfwayClientRpc(); - - if (showDebugLogs) - Debug.Log($"[GlobalTimer] 사이클 중간 지점 도달"); } // 사이클 완료 @@ -136,14 +133,11 @@ namespace Northbound // 다음 사이클 시작 _currentTime.Value = cycleLength; _cycleCount.Value++; - _hasReachedHalfway = false; + _hasReachedHalfway = false; - OnCycleStart?.Invoke(_cycleCount.Value); - NotifyCycleStartClientRpc(_cycleCount.Value); - - if (showDebugLogs) - Debug.Log($"[GlobalTimer] 사이클 {_cycleCount.Value} 시작"); - } + OnCycleStart?.Invoke(_cycleCount.Value); + NotifyCycleStartClientRpc(_cycleCount.Value); + } } private void OnCurrentTimeChanged(float previousValue, float newValue) @@ -171,9 +165,6 @@ namespace Northbound OnCycleStart?.Invoke(_cycleCount.Value); NotifyCycleStartClientRpc(_cycleCount.Value); - - if (showDebugLogs) - Debug.Log($"[GlobalTimer] 타이머 시작: {cycleLength}초"); } /// diff --git a/Assets/Scripts/InteractableModalManager.cs b/Assets/Scripts/InteractableModalManager.cs index 466daa2..bff2be8 100644 --- a/Assets/Scripts/InteractableModalManager.cs +++ b/Assets/Scripts/InteractableModalManager.cs @@ -17,12 +17,9 @@ namespace Northbound private void Awake() { - Debug.Log($"[InteractableModalManager] Awake called on {gameObject.name}"); - if (playerInteraction == null) { playerInteraction = GetComponent(); - Debug.Log($"[InteractableModalManager] PlayerInteraction: {(playerInteraction != null ? "Found" : "Not Found")}"); } FindModalComponent(); @@ -30,15 +27,8 @@ namespace Northbound private void Start() { - Debug.Log($"[InteractableModalManager] Start called on {gameObject.name}"); - FindModalComponent(); - if (interactableModal == null) - { - Debug.LogError("[InteractableModalManager] InteractableModal is still null in Start!"); - } - // Start()에서 HideModal()을 호출하지 않음 - 첫 번째 Update에서 Modal이 표시되지 않는 문제 방지 // modalPanel과 unavailablePanel은 InteractableModal.Start()에서 이미 false로 설정됨 } @@ -47,21 +37,14 @@ namespace Northbound { if (interactableModal != null) { - Debug.Log($"[InteractableModalManager] InteractableModal already assigned: {interactableModal.gameObject.name}"); return; } InteractableModal[] modals = GetComponentsInChildren(true); - Debug.Log($"[InteractableModalManager] Found {modals.Length} InteractableModal components in player children"); if (modals.Length > 0) { interactableModal = modals[0]; - Debug.Log($"[InteractableModalManager] Using InteractableModal on: {interactableModal.gameObject.name}"); - } - else - { - Debug.LogWarning("[InteractableModalManager] InteractableModal not found in player children!"); } } @@ -69,7 +52,6 @@ namespace Northbound { if (playerInteraction == null) { - Debug.LogWarning("[InteractableModalManager] Update: playerInteraction is null"); return; } @@ -100,17 +82,14 @@ namespace Northbound if (_currentInteractable != null) { - Debug.Log($"[InteractableModalManager] Show modal for interactable"); ShowModal(_currentInteractable); } else if (unavailableInteractable != null) { - Debug.Log($"[InteractableModalManager] Show unavailable message"); ShowUnavailableMessageModal(unavailableInteractable); } else { - Debug.Log($"[InteractableModalManager] Hide modal"); HideModal(); } } diff --git a/Assets/Scripts/MapGenerator.cs b/Assets/Scripts/MapGenerator.cs index 4242857..d0ab056 100644 --- a/Assets/Scripts/MapGenerator.cs +++ b/Assets/Scripts/MapGenerator.cs @@ -162,7 +162,6 @@ namespace Northbound } else { - Debug.LogWarning("[MapGenerator] Core not found in scene!"); _corePosition = Vector2.zero; } @@ -178,7 +177,6 @@ namespace Northbound } else { - Debug.LogWarning("[MapGenerator] No Resource found in scene!"); _initialResourcePosition = Vector2.zero; } @@ -189,7 +187,6 @@ namespace Northbound } else { - Debug.LogWarning("[MapGenerator] Worker Hall not found in scene!"); _barracksPosition = Vector2.zero; } } @@ -219,7 +216,6 @@ namespace Northbound { if (resourcePrefab == null) { - Debug.LogError("[MapGenerator] Resource prefab not assigned!"); return; } @@ -231,20 +227,13 @@ namespace Northbound { _generatedResources = resources; success = true; - Debug.Log($"[MapGenerator] Normal resource generation succeeded on attempt {attempt + 1}"); break; } - else - { - Debug.LogWarning($"[MapGenerator] Resource generation attempt {attempt + 1} failed validation"); - } } if (!success) { - Debug.LogWarning("[MapGenerator] All resource generation attempts failed, using fallback layout"); GenerateResourceFallbackLayout(); - Debug.Log($"[MapGenerator] Fallback layout X coordinates: {string.Join(", ", System.Array.ConvertAll(_generatedResources, r => r.position.x.ToString("F1")))}"); } SpawnResources(); @@ -309,7 +298,6 @@ namespace Northbound if (IsValidResourcePosition(candidatePosition, existingResources, currentIndex)) { position = candidatePosition; - Debug.Log($"[MapGenerator] Generated valid resource position: X={position.x:F2} (range: {-playableAreaWidth/2f:F2} to {playableAreaWidth/2f:F2})"); return true; } } @@ -414,7 +402,6 @@ namespace Northbound Resource resource = resourceObj.GetComponent(); if (resource == null) { - Debug.LogError($"[MapGenerator] Resource prefab at index {i} doesn't have Resource component!"); Destroy(resourceObj); continue; } @@ -428,7 +415,6 @@ namespace Northbound } else { - Debug.LogError($"[MapGenerator] Resource prefab at index {i} doesn't have NetworkObject component!"); Destroy(resourceObj); } @@ -456,7 +442,6 @@ namespace Northbound { if (obstacle.prefab == null) { - Debug.LogWarning($"[MapGenerator] Obstacle prefab is null!"); continue; } @@ -657,7 +642,6 @@ namespace Northbound { if (creepCampPrefab == null) { - Debug.LogWarning("[MapGenerator] Creep camp prefab not assigned, skipping creep camp generation."); return; } @@ -665,7 +649,6 @@ namespace Northbound if (_creepPrefabs.Count == 0) { - Debug.LogWarning("[MapGenerator] No creep prefabs found in Assets/Prefabs/Creep/, skipping creep camp generation."); return; } @@ -721,13 +704,8 @@ namespace Northbound } } #else - Debug.LogWarning("[MapGenerator] Creep prefabs not loaded in build. Please assign creep prefabs manually in Inspector."); + // Creep prefabs not available in build - please assign manually #endif - - if (_creepPrefabs.Count == 0) - { - Debug.LogWarning("[MapGenerator] No creep prefabs loaded!"); - } } private Vector3 FindValidCampPosition() @@ -791,8 +769,6 @@ namespace Northbound float bestDistance = float.MaxValue; int maxAttempts = 50; - Debug.Log($"[MapGenerator] FindValidCampPositionForResource: Resource at {resourcePosition}, bounds: X:[{-playableAreaWidth/2f}, {playableAreaWidth/2f}], Z:[{startZ}, {endZ}]"); - for (int attempt = 0; attempt < maxAttempts; attempt++) { float angle = Random.Range(0f, 360f); @@ -813,11 +789,6 @@ namespace Northbound } } - if (bestPosition == Vector3.zero) - { - Debug.LogWarning($"[MapGenerator] Failed to find camp position for resource at {resourcePosition} after {maxAttempts} attempts"); - } - return bestPosition; } @@ -855,7 +826,6 @@ namespace Northbound creepCamp.InitializeCamp(position.z, strength, campCostBudget, spawnRadius, maxSpawnAttempts); creepCamp.SetCreepPrefabs(_creepPrefabs); - Debug.Log($"[MapGenerator] Camp initialized with {_creepPrefabs.Count} creep prefabs"); NetworkObject networkObj = campObj.GetComponent(); if (networkObj == null) diff --git a/Assets/Scripts/MonsterDataComponent.cs b/Assets/Scripts/MonsterDataComponent.cs index 8101f23..fdb13b7 100644 --- a/Assets/Scripts/MonsterDataComponent.cs +++ b/Assets/Scripts/MonsterDataComponent.cs @@ -31,7 +31,6 @@ namespace Northbound { if (monsterData == null) { - Debug.LogWarning("[MonsterDataComponent] monsterData is null", this); return; } @@ -55,8 +54,6 @@ namespace Northbound { navAgent.speed = monsterData.moveSpeed; } - - Debug.Log($"[MonsterDataComponent] Applied data for {monsterData.id} ({monsterData.memo})", this); } } } diff --git a/Assets/Scripts/NetworkConfigDebugger.cs b/Assets/Scripts/NetworkConfigDebugger.cs index a5251e5..2d221e5 100644 --- a/Assets/Scripts/NetworkConfigDebugger.cs +++ b/Assets/Scripts/NetworkConfigDebugger.cs @@ -58,10 +58,5 @@ namespace Northbound Debug.Log("================================"); } - - private void Start() - { - Invoke(nameof(LogNetworkConfig), 1f); - } } } diff --git a/Assets/Scripts/NetworkConnectionHandler.cs b/Assets/Scripts/NetworkConnectionHandler.cs index 17f3663..0e7bdeb 100644 --- a/Assets/Scripts/NetworkConnectionHandler.cs +++ b/Assets/Scripts/NetworkConnectionHandler.cs @@ -33,11 +33,9 @@ namespace Northbound NetworkManager.Singleton.ConnectionApprovalCallback = ApprovalCheck; NetworkManager.Singleton.OnServerStarted += OnServerStarted; NetworkManager.Singleton.OnClientConnectedCallback += OnClientConnected; - Debug.Log("[Connection] ConnectionApprovalCallback 등록됨"); } else { - Debug.LogError("[Connection] NetworkManager.Singleton이 null입니다!"); } } @@ -56,13 +54,10 @@ namespace Northbound spawnPoints.Add(point.transform); } } - - Debug.Log($"[Connection] {spawnPoints.Count}개의 스폰 포인트를 찾았습니다."); } private void OnServerStarted() { - Debug.Log("[Connection] 서버 시작됨"); if (ServerResourceManager.Instance == null) { @@ -76,9 +71,8 @@ namespace Northbound } networkObject.Spawn(); - Debug.Log("[Connection] ServerResourceManager spawned."); } - + if (NetworkManager.Singleton.IsHost) { SpawnPlayer(NetworkManager.Singleton.LocalClientId); @@ -90,11 +84,9 @@ namespace Northbound if (!NetworkManager.Singleton.IsServer) return; if (clientId == NetworkManager.Singleton.LocalClientId) return; - Debug.Log($"[Connection] 클라이언트 {clientId} 연결됨"); if (!NetworkManager.Singleton.ConnectedClients.TryGetValue(clientId, out var client) || client.PlayerObject != null) { - Debug.Log($"[Connection] 클라이언트 {clientId}의 플레이어가 이미 존재합니다."); return; } @@ -109,7 +101,6 @@ namespace Northbound GameObject playerPrefab = NetworkManager.Singleton.NetworkConfig.PlayerPrefab; if (playerPrefab == null) { - Debug.LogError("[Connection] PlayerPrefab이 null입니다!"); return; } @@ -117,13 +108,10 @@ namespace Northbound NetworkObject networkObject = playerObject.GetComponent(); if (networkObject == null) { - Debug.LogError("[Connection] PlayerPrefab에 NetworkObject가 없습니다!"); return; } - + networkObject.SpawnAsPlayerObject(clientId); - - Debug.Log($"[Connection] 플레이어 {clientId} 스폰됨: {spawnPosition}"); } private void ApprovalCheck( @@ -131,27 +119,23 @@ namespace Northbound NetworkManager.ConnectionApprovalResponse response) { spawnPoints.RemoveAll(p => p == null); - + if (spawnPoints.Count == 0) { - Debug.LogError($"[Connection] 스폰 포인트가 없습니다! 씬에 PlayerSpawnPoint가 있는지 확인하세요."); } response.Approved = true; response.CreatePlayerObject = false; response.Position = Vector3.zero; response.Rotation = Quaternion.identity; - - Debug.Log($"[Connection] 클라이언트 {request.ClientNetworkId} 승인됨. 수동 스폰으로 대기."); } private Vector3 GetSpawnPosition(ulong clientId) { spawnPoints.RemoveAll(p => p == null); - + if (spawnPoints.Count == 0) { - Debug.LogWarning("[Connection] 스폰 포인트가 없습니다. 기본 위치 반환."); return Vector3.zero; } @@ -172,12 +156,10 @@ namespace Northbound if (spawnIndex >= spawnPoints.Count) { - Debug.LogWarning($"[Connection] 스폰 인덱스 {spawnIndex}가 범위를 벗어났습니다. 기본값으로 조정."); spawnIndex = spawnIndex % spawnPoints.Count; } } - Debug.Log($"[Connection] 클라이언트 {clientId}에게 스폰 인덱스 {spawnIndex} 할당"); return spawnPoints[spawnIndex].position; } diff --git a/Assets/Scripts/NetworkConnectionHelper.cs b/Assets/Scripts/NetworkConnectionHelper.cs index 82b6d64..64dbb3b 100644 --- a/Assets/Scripts/NetworkConnectionHelper.cs +++ b/Assets/Scripts/NetworkConnectionHelper.cs @@ -39,11 +39,10 @@ namespace Northbound } ConfigureTransport("0.0.0.0", port); - + if (!NetworkManager.Singleton.IsServer && !NetworkManager.Singleton.IsClient) { NetworkManager.Singleton.StartHost(); - Debug.Log($"[NetworkConnectionHelper] Started Host on port {port}"); } } diff --git a/Assets/Scripts/NetworkPlayerController.cs b/Assets/Scripts/NetworkPlayerController.cs index 022cb77..e7477b3 100644 --- a/Assets/Scripts/NetworkPlayerController.cs +++ b/Assets/Scripts/NetworkPlayerController.cs @@ -60,8 +60,6 @@ public class NetworkPlayerController : NetworkBehaviour, ITeamMember, IDamageabl { _currentHealth.Value = maxHealth; } - - Debug.Log($"[Player] {gameObject.name} 스폰됨 (팀: {TeamManager.GetTeamName(_team.Value)}, 체력: {_currentHealth.Value}/{maxHealth})"); } // 체력 변경 이벤트 구독 @@ -69,14 +67,13 @@ public class NetworkPlayerController : NetworkBehaviour, ITeamMember, IDamageabl if (!IsOwner) return; - var vcam = GameObject.FindFirstObjectByType(); + var vcam = GameObject.FindFirstObjectByType(); - if (vcam != null) - { - vcam.Follow = transform; - vcam.LookAt = transform; - Debug.Log("[Camera] 로컬 플레이어에게 카메라가 연결되었습니다."); - } + if (vcam != null) + { + vcam.Follow = transform; + vcam.LookAt = transform; + } _inputActions = new PlayerInputActions(); _inputActions.Enable(); @@ -148,7 +145,6 @@ public class NetworkPlayerController : NetworkBehaviour, ITeamMember, IDamageabl TeamType previousTeam = _team.Value; _team.Value = team; - Debug.Log($"[Player] 팀 변경: {TeamManager.GetTeamName(previousTeam)} → {TeamManager.GetTeamName(team)}"); } #endregion @@ -170,7 +166,6 @@ public class NetworkPlayerController : NetworkBehaviour, ITeamMember, IDamageabl { if (!TeamManager.CanAttack(attackerTeamMember, this)) { - Debug.Log($"[Player] {TeamManager.GetTeamName(attackerTeamMember.GetTeam())} 팀은 {TeamManager.GetTeamName(_team.Value)} 팀을 공격할 수 없습니다."); return; } } @@ -180,8 +175,6 @@ public class NetworkPlayerController : NetworkBehaviour, ITeamMember, IDamageabl int actualDamage = Mathf.Min(damage, _currentHealth.Value); _currentHealth.Value -= actualDamage; - Debug.Log($"[Player] {gameObject.name} ({TeamManager.GetTeamName(_team.Value)})이(가) {actualDamage} 데미지를 받았습니다. 남은 체력: {_currentHealth.Value}/{maxHealth}"); - // 데미지 이펙트 ShowDamageEffectClientRpc(); @@ -192,13 +185,11 @@ public class NetworkPlayerController : NetworkBehaviour, ITeamMember, IDamageabl } } - private void Die(ulong killerId) - { - if (!IsServer) return; + private void Die(ulong killerId) + { + if (!IsServer) return; - Debug.Log($"[Player] {gameObject.name} ({TeamManager.GetTeamName(_team.Value)})이(가) 사망했습니다! (킬러: {killerId})"); - - // 사망 이펙트 + // 사망 이펙트 ShowDeathEffectClientRpc(); // 애니메이션 (있는 경우) @@ -237,7 +228,6 @@ public class NetworkPlayerController : NetworkBehaviour, ITeamMember, IDamageabl } _animator.SetTrigger("Revive"); - Debug.Log($"[Player] {gameObject.name} 리스폰!"); } [ClientRpc] @@ -296,14 +286,11 @@ public class NetworkPlayerController : NetworkBehaviour, ITeamMember, IDamageabl int healAmount = Mathf.Min(amount, maxHealth - _currentHealth.Value); _currentHealth.Value += healAmount; - - Debug.Log($"[Player] {gameObject.name}이(가) {healAmount} 회복되었습니다. 현재 체력: {_currentHealth.Value}/{maxHealth}"); } private void OnHealthChanged(int previousValue, int newValue) { // 체력바 UI 업데이트 또는 체력 변경 시각 효과 - Debug.Log($"[Player] 체력 변경: {previousValue} → {newValue}"); // 클라이언트에서도 체력 변경 인지 가능 if (IsOwner) diff --git a/Assets/Scripts/Resource.cs b/Assets/Scripts/Resource.cs index 2ffc1c1..9d3a3bd 100644 --- a/Assets/Scripts/Resource.cs +++ b/Assets/Scripts/Resource.cs @@ -270,10 +270,6 @@ namespace Northbound ShowGatheringEffectClientRpc(); } - else - { - Debug.LogWarning($"[Resource] Worker not in Following state! State: {(int)assignedWorker.CurrentState}"); - } } } @@ -370,7 +366,6 @@ namespace Northbound { if (NetworkManager.Singleton == null || NetworkManager.Singleton.SpawnManager == null) { - Debug.LogWarning($"[Resource] FindWorkerForPlayer - NetworkManager or SpawnManager is null"); return null; } diff --git a/Assets/Scripts/SimpleNetworkMonitor.cs b/Assets/Scripts/SimpleNetworkMonitor.cs index 3f853d8..4e84c2b 100644 --- a/Assets/Scripts/SimpleNetworkMonitor.cs +++ b/Assets/Scripts/SimpleNetworkMonitor.cs @@ -25,7 +25,6 @@ namespace Northbound if (enableOnStart) { _networkManager = NetworkManager.Singleton; - Debug.Log("[SimpleMonitor] Simple Network Monitor started"); } } @@ -47,21 +46,39 @@ namespace Northbound { if (_networkManager == null) { - Debug.LogWarning("[SimpleMonitor] NetworkManager not found"); return; } bool isServer = _networkManager.IsServer; bool isClient = _networkManager.IsClient; bool isHost = _networkManager.IsHost; - + if (isServer && !isClient && _eventsLogged < 3) { _serverStartCount++; _lastServerStartTime = Time.time; - Debug.Log("[SimpleMonitor] Server started (Count: " + _serverStartCount + ")"); _eventsLogged++; } + + if (!isServer && !isClient && _lastServerStartTime > 0f && _eventsLogged < 50) + { + float uptime = Time.time - _lastServerStartTime; + _serverStopCount++; + _eventsLogged++; + + if (_serverStopCount >=3) + { + } + } + + if (isServer && _serverStartCount > 0) + { + if (_eventsLogged % 10 ==0) + { + float uptime = Time.time - _lastServerStartTime; + _eventsLogged++; + } + } if (!isServer && !isClient && _lastServerStartTime > 0f && _eventsLogged < 50) { @@ -96,20 +113,11 @@ namespace Northbound _serverStartCount = 0; _lastServerStartTime = 0f; _eventsLogged = 0; - Debug.Log("[SimpleMonitor] Counters reset"); } - + [ContextMenu("Show Stats")] public void ShowStats() { - Debug.Log("=== SIMPLE MONITOR STATS ==="); - Debug.Log("Server Stops: " + _serverStopCount); - Debug.Log("Server Starts: " + _serverStartCount); - Debug.Log("NetworkManager:"); - Debug.Log(" IsServer: " + (_networkManager != null ? _networkManager.IsServer.ToString() : "null")); - Debug.Log(" IsClient: " + (_networkManager != null ? _networkManager.IsClient.ToString() : "null")); - Debug.Log(" IsHost: " + (_networkManager != null ? _networkManager.IsHost.ToString() : "null")); - Debug.Log("============================"); } } }