건설 인터랙션 관련 버그 수정 및 건설 데이터 구조 개선
건설 인터랙션 시 움직이지 못하는 문제 수정 2개로 분리되어 있던 타워 데이터를 하나로 통합 - 대신 타워가 아닌 건물도 공격력 등을 정의할 수 있음
This commit is contained in:
@@ -30,10 +30,10 @@ namespace Northbound.Editor
|
||||
{
|
||||
string assetPath = AssetDatabase.GUIDToAssetPath(guid);
|
||||
GameObject prefab = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
|
||||
TowerDataComponent tower = prefab?.GetComponent<TowerDataComponent>();
|
||||
string towerStatus = tower != null && tower.towerData != null ? "<color=green>✓</color>" : "<color=red>✗</color>";
|
||||
string towerDataName = tower?.towerData?.name ?? "MISSING";
|
||||
Debug.Log($" {towerStatus} {prefab.name} - TowerDataComponent: {tower != null}, TowerData: {towerDataName}");
|
||||
Building building = prefab?.GetComponent<Building>();
|
||||
string towerStatus = building != null && building.buildingData != null ? "<color=green>✓</color>" : "<color=red>✗</color>";
|
||||
string towerDataName = building?.buildingData?.name ?? "MISSING";
|
||||
Debug.Log($" {towerStatus} {prefab.name} - Building: {building != null}, TowerData: {towerDataName}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user