diff --git a/Assets/Scripts/BuildingPlacement.cs b/Assets/Scripts/BuildingPlacement.cs index ba0ad4c..0a04737 100644 --- a/Assets/Scripts/BuildingPlacement.cs +++ b/Assets/Scripts/BuildingPlacement.cs @@ -312,6 +312,12 @@ namespace Northbound collider.enabled = false; } + // Disable NavMeshObstacles in preview (they act as obstacles for NavMeshAgent) + foreach (var obstacle in previewObject.GetComponentsInChildren()) + { + obstacle.enabled = false; + } + Debug.Log($"[BuildingPlacement] 프리뷰 생성됨: {data.buildingName}"); } @@ -528,6 +534,12 @@ namespace Northbound collider.enabled = false; } + // Disable NavMeshObstacles in preview (they act as obstacles for NavMeshAgent) + foreach (var obstacle in preview.GetComponentsInChildren()) + { + obstacle.enabled = false; + } + dragPreviewObjects.Add(preview); if (isValid)