디버깅용 로그 제거

This commit is contained in:
2026-01-30 16:14:41 +09:00
parent e9cebeedf0
commit 8c7c82e984
8 changed files with 21 additions and 124 deletions

View File

@@ -2028,7 +2028,9 @@ MonoBehaviour:
showInExploredAreas: 0
updateInterval: 0.2
renderers: []
debugLogging: 0
enableDistantVisibility: 1
heightVisibilityMultiplier: 2
minHeightForDistantVisibility: 3
useExploredMaterial: 0
exploredMaterial: {fileID: 0}
--- !u!1 &1433142230
@@ -2450,7 +2452,7 @@ MonoBehaviour:
serializedVersion: 2
m_Bits: 896
collisionCheckRadius: 1
spawnOnStart: 0
spawnOnStart: 1
groupUnderParent: 1
--- !u!4 &1572384099
Transform:
@@ -2678,6 +2680,8 @@ MonoBehaviour:
fogMaterial: {fileID: 2100000, guid: eb0604feb76547a488648224ebb23e77, type: 2}
updateInterval: 0.1
fogHeight: 2
enableSmoothing: 1
smoothingPasses: 2
unexploredColor: {r: 0, g: 0, b: 0, a: 1}
exploredColor: {r: 0, g: 0, b: 0, a: 0.6}
visibleColor: {r: 0, g: 0, b: 0, a: 0}
@@ -2881,63 +2885,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 5749230937810543840, guid: 88f7f1e8a019b674498ab5fd494c1d34, type: 3}
m_PrefabInstance: {fileID: 1862165056}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1912551706
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5791990943856352332, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_LocalPosition.x
value: -8.854406
objectReference: {fileID: 0}
- target: {fileID: 5791990943856352332, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_LocalPosition.y
value: 1.0000119
objectReference: {fileID: 0}
- target: {fileID: 5791990943856352332, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_LocalPosition.z
value: -60.088272
objectReference: {fileID: 0}
- target: {fileID: 5791990943856352332, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5791990943856352332, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5791990943856352332, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5791990943856352332, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5791990943856352332, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5791990943856352332, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5791990943856352332, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7245241003860522441, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
propertyPath: m_Name
value: Rock2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2c33c67d086286d4a929d533b4e26863, type: 3}
--- !u!1001 &1975225896
PrefabInstance:
m_ObjectHideFlags: 0
@@ -3656,4 +3603,3 @@ SceneRoots:
- {fileID: 1442785555}
- {fileID: 1440648431994998967}
- {fileID: 1061936651}
- {fileID: 1912551706}

View File

@@ -88,7 +88,7 @@ namespace Northbound
if (useInitialOwner && _ownerId.Value == 0)
{
_ownerId.Value = initialOwnerId;
Debug.Log($"<color=cyan>[Building] 사전 배치 건물 '{buildingData?.buildingName ?? gameObject.name}' 소유자: {initialOwnerId}, 팀: {_team.Value}</color>");
// Debug.Log($"<color=cyan>[Building] 사전 배치 건물 '{buildingData?.buildingName ?? gameObject.name}' 소유자: {initialOwnerId}, 팀: {_team.Value}</color>");
}
else if (!useInitialOwner && _ownerId.Value == 0)
{

View File

@@ -92,7 +92,7 @@ namespace Northbound
{
int slotIndex = i; // 클로저 캡처를 위한 로컬 변수
_quickslotActions[i].performed += ctx => OnQuickslotPressed(slotIndex);
Debug.Log($"[BuildingQuickslotUI] QuickSlot{i + 1} 액션 바인딩 성공");
// Debug.Log($"[BuildingQuickslotUI] QuickSlot{i + 1} 액션 바인딩 성공");
}
else
{

View File

@@ -92,7 +92,7 @@ namespace Northbound.Editor
[MenuItem("Tools/Fog of War/Add Visibility to Scene Obstacles")]
public static void AddVisibilityToSceneObstacles()
{
GameObject[] allObjects = GameObject.FindObjectsOfType<GameObject>();
GameObject[] allObjects = GameObject.FindObjectsByType<GameObject>(FindObjectsSortMode.None);
int count = 0;
foreach (GameObject obj in allObjects)
@@ -153,7 +153,7 @@ namespace Northbound.Editor
}
// Remove from scene objects
FogOfWarVisibility[] sceneComponents = GameObject.FindObjectsOfType<FogOfWarVisibility>();
FogOfWarVisibility[] sceneComponents = GameObject.FindObjectsByType<FogOfWarVisibility>(FindObjectsSortMode.None);
int sceneCount = sceneComponents.Length;
foreach (var comp in sceneComponents)

View File

@@ -298,7 +298,7 @@ namespace Northbound
if (!_visionProviders.Contains(provider))
{
_visionProviders.Add(provider);
Debug.Log($"<color=cyan>[FogOfWar] Vision Provider 등록: {provider.GetTransform().name} (Owner: {provider.GetOwnerId()})</color>");
// Debug.Log($"<color=cyan>[FogOfWar] Vision Provider 등록: {provider.GetTransform().name} (Owner: {provider.GetOwnerId()})</color>");
}
}

View File

@@ -19,9 +19,6 @@ namespace Northbound
[Tooltip("Renderers to show/hide (auto-detected if empty)")]
public Renderer[] renderers;
[Tooltip("Enable debug logging for this object")]
public bool debugLogging = false;
[Header("Height-Based Distant Visibility")]
[Tooltip("Enable visibility from farther away based on object height")]
public bool enableDistantVisibility = true;
@@ -52,11 +49,6 @@ namespace Northbound
if (renderers == null || renderers.Length == 0)
{
renderers = GetComponentsInChildren<Renderer>();
if (debugLogging)
{
Debug.Log($"[FogOfWarVisibility] {gameObject.name}: Auto-detected {renderers.Length} renderers");
}
}
if (renderers == null || renderers.Length == 0)
@@ -81,17 +73,7 @@ namespace Northbound
// Calculate object height for distant visibility
_objectHeight = CalculateObjectHeight();
if (debugLogging)
{
Debug.Log($"[FogOfWarVisibility] {gameObject.name}: Object height = {_objectHeight}m");
}
// CRITICAL: Start hidden and stay hidden until fog system confirms visibility
if (debugLogging)
{
Debug.Log($"[FogOfWarVisibility] {gameObject.name}: START - Setting all {renderers.Length} renderers to HIDDEN");
}
// Force initial hide - don't use SetVisible because _isVisible defaults to false
// which would cause early return
_isVisible = true; // Set to true first so SetVisible(false) actually runs
@@ -198,16 +180,10 @@ namespace Northbound
isDistantVisible = CheckDistantVisibility(fogSystem);
}
if (debugLogging)
{
Debug.Log($"[FogOfWarVisibility] {gameObject.name} at {transform.position}: State={fogState}, DistantVisible={isDistantVisible}, Height={_objectHeight}m");
}
switch (fogState)
{
case FogOfWarState.Visible:
// Currently visible - show with original materials
if (debugLogging) Debug.Log($"[FogOfWarVisibility] {gameObject.name}: Setting VISIBLE");
SetVisible(true);
SetExploredVisual(false);
break;
@@ -217,13 +193,11 @@ namespace Northbound
// BUT: Tall objects can be seen from farther away
if (showInExploredAreas || isDistantVisible)
{
if (debugLogging) Debug.Log($"[FogOfWarVisibility] {gameObject.name}: Setting EXPLORED (visible) - distantVisible={isDistantVisible}");
SetVisible(true);
SetExploredVisual(true);
}
else
{
if (debugLogging) Debug.Log($"[FogOfWarVisibility] {gameObject.name}: Setting EXPLORED (hidden)");
SetVisible(false);
}
break;
@@ -232,13 +206,11 @@ namespace Northbound
// Never seen - hide unless tall enough to see from distance
if (isDistantVisible)
{
if (debugLogging) Debug.Log($"[FogOfWarVisibility] {gameObject.name}: Setting UNEXPLORED but DISTANT VISIBLE");
SetVisible(true);
SetExploredVisual(true); // Show as explored/distant
}
else
{
if (debugLogging) Debug.Log($"[FogOfWarVisibility] {gameObject.name}: Setting UNEXPLORED (hidden)");
SetVisible(false);
}
break;
@@ -276,11 +248,6 @@ namespace Northbound
float baseVisionRange = 15f; // You can make this configurable
float totalRange = baseVisionRange + extendedRange;
if (debugLogging)
{
Debug.Log($"[FogOfWarVisibility] {gameObject.name}: Distance={distanceToPlayer:F1}m, ExtendedRange={totalRange:F1}m (height bonus: +{extendedRange:F1}m)");
}
return distanceToPlayer <= totalRange;
}
@@ -291,29 +258,13 @@ namespace Northbound
_isVisible = visible;
if (renderers == null || renderers.Length == 0)
{
if (debugLogging)
{
Debug.LogWarning($"[FogOfWarVisibility] {gameObject.name}: SetVisible({visible}) called but no renderers!");
}
return;
}
if (debugLogging)
{
Debug.Log($"[FogOfWarVisibility] {gameObject.name}: SetVisible({visible}) - updating {renderers.Length} renderers");
}
foreach (var renderer in renderers)
{
if (renderer != null)
{
renderer.enabled = visible;
if (debugLogging)
{
Debug.Log($"[FogOfWarVisibility] {gameObject.name}: Renderer '{renderer.name}' enabled = {visible}");
}
}
}
}

View File

@@ -121,7 +121,7 @@ namespace Northbound
int totalSpawned = 0;
int targetCount = Mathf.RoundToInt(maxTotalObstacles * density);
Debug.Log($"<color=cyan>[ObstacleSpawner] 장애물 생성 시작 (목표: {targetCount}개)</color>");
// Debug.Log($"<color=cyan>[ObstacleSpawner] 장애물 생성 시작 (목표: {targetCount}개)</color>");
// 각 장애물 타입별로 최소 개수 보장
foreach (var obstacle in obstacles)
@@ -160,7 +160,7 @@ namespace Northbound
// 모든 장애물이 최대치에 도달했는지 확인
if (AllObstaclesAtMax())
{
Debug.Log("<color=yellow>[ObstacleSpawner] 모든 장애물이 최대 개수에 도달했습니다.</color>");
// Debug.Log("<color=yellow>[ObstacleSpawner] 모든 장애물이 최대 개수에 도달했습니다.</color>");
break;
}
continue;
@@ -182,7 +182,7 @@ namespace Northbound
Debug.LogWarning($"<color=yellow>[ObstacleSpawner] 배치 공간이 부족합니다. {totalSpawned}개만 생성되었습니다.</color>");
}
Debug.Log($"<color=green>[ObstacleSpawner] 장애물 생성 완료: {totalSpawned}개</color>");
// Debug.Log($"<color=green>[ObstacleSpawner] 장애물 생성 완료: {totalSpawned}개</color>");
}
private bool AllObstaclesAtMax()
@@ -209,14 +209,14 @@ namespace Northbound
// 최소 거리 체크
if (!IsValidPosition(randomPos))
{
Debug.Log($"<color=orange>[Spawn] 최소 거리 체크 실패: {randomPos}</color>");
// Debug.Log($"<color=orange>[Spawn] 최소 거리 체크 실패: {randomPos}</color>");
continue;
}
// 충돌 체크
if (checkCollision && Physics.CheckSphere(randomPos, collisionCheckRadius, collisionLayers))
{
Debug.Log($"<color=orange>[Spawn] 충돌 감지: {randomPos}, 반경: {collisionCheckRadius}</color>");
// Debug.Log($"<color=orange>[Spawn] 충돌 감지: {randomPos}, 반경: {collisionCheckRadius}</color>");
continue;
}
@@ -226,11 +226,11 @@ namespace Northbound
if (Physics.Raycast(randomPos + Vector3.up * 100f, Vector3.down, out RaycastHit hit, 200f))
{
randomPos = hit.point;
Debug.Log($"<color=cyan>[Spawn] 지형 감지 성공: {hit.collider.name}</color>");
// Debug.Log($"<color=cyan>[Spawn] 지형 감지 성공: {hit.collider.name}</color>");
}
else
{
Debug.Log($"<color=orange>[Spawn] 지형 감지 실패: {randomPos}</color>");
// Debug.Log($"<color=orange>[Spawn] 지형 감지 실패: {randomPos}</color>");
// 지형이 없어도 배치 시도
}
}
@@ -263,7 +263,7 @@ namespace Northbound
}
_spawnedPositions.Add(randomPos);
Debug.Log($"<color=green>[Spawn] 장애물 배치 성공: {obstacleEntry.prefab.name} at {randomPos}</color>");
// Debug.Log($"<color=green>[Spawn] 장애물 배치 성공: {obstacleEntry.prefab.name} at {randomPos}</color>");
return true;
}

View File

@@ -167,7 +167,7 @@ namespace Northbound
PlaySoundClientRpc(true);
}
Debug.Log($"<color=cyan>[TeamGate] {other.name} 텔레포트: {triggeredCollider.name} -> {exitPoint.name}</color>");
// Debug.Log($"<color=cyan>[TeamGate] {other.name} 텔레포트: {triggeredCollider.name} -> {exitPoint.name}</color>");
}
else
{
@@ -177,7 +177,7 @@ namespace Northbound
PlaySoundClientRpc(false);
}
Debug.Log($"<color=yellow>[TeamGate] {other.name} 차단됨 - 팀: {teamMember.GetTeam()}</color>");
// Debug.Log($"<color=yellow>[TeamGate] {other.name} 차단됨 - 팀: {teamMember.GetTeam()}</color>");
}
_triggerStates[other] = false;