건설 인터랙션 관련 버그 수정 및 건설 데이터 구조 개선
건설 인터랙션 시 움직이지 못하는 문제 수정 2개로 분리되어 있던 타워 데이터를 하나로 통합 - 대신 타워가 아닌 건물도 공격력 등을 정의할 수 있음
This commit is contained in:
@@ -123,10 +123,9 @@ namespace Northbound.Editor
|
||||
}
|
||||
|
||||
// If towers were imported, auto-configure BuildingManager
|
||||
// TowerData now extends BuildingData, so it can be used directly!
|
||||
if (typeName == "Tower")
|
||||
{
|
||||
Debug.Log($"<color=cyan>[CSVToSOImporter] Tower import complete, TowerData extends BuildingData now!</color>");
|
||||
Debug.Log($"<color=cyan>[CSVToSOImporter] Tower import complete!</color>");
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -203,10 +202,10 @@ namespace Northbound.Editor
|
||||
}
|
||||
|
||||
// Now set the prefab reference on data
|
||||
if (data is BuildingData buildingData)
|
||||
if (data is TowerData towerData)
|
||||
{
|
||||
buildingData.prefab = prefabObj;
|
||||
Debug.Log($"[CSVToSOImporter] Set prefab reference: {buildingData.name} -> {prefabObj.name}");
|
||||
towerData.prefab = prefabObj;
|
||||
Debug.Log($"[CSVToSOImporter] Set prefab reference: {towerData.name} -> {prefabObj.name}");
|
||||
}
|
||||
|
||||
// Save data asset
|
||||
@@ -236,9 +235,9 @@ namespace Northbound.Editor
|
||||
return;
|
||||
}
|
||||
|
||||
// Load TowerData (which extends BuildingData)
|
||||
// Load TowerData
|
||||
string[] towerDataGuids = AssetDatabase.FindAssets("t:TowerData", new[] { "Assets/Data/ScriptableObjects" });
|
||||
List<BuildingData> allTowers = new List<BuildingData>();
|
||||
List<TowerData> allTowers = new List<TowerData>();
|
||||
|
||||
Debug.Log($"<color=cyan>[CSVToSOImporter] Found {towerDataGuids.Length} TowerData assets</color>");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user