건설 인터랙션 관련 버그 수정 및 건설 데이터 구조 개선
건설 인터랙션 시 움직이지 못하는 문제 수정 2개로 분리되어 있던 타워 데이터를 하나로 통합 - 대신 타워가 아닌 건물도 공격력 등을 정의할 수 있음
This commit is contained in:
@@ -84,6 +84,15 @@ namespace Northbound.Editor
|
||||
Debug.Log($"[PlayerPrefabSetup] Updated PlayerResourceInventory: maxResourceCapacity={playerData.capacity}");
|
||||
}
|
||||
|
||||
var playerInteraction = prefab.GetComponent<PlayerInteraction>();
|
||||
if (playerInteraction != null)
|
||||
{
|
||||
SerializedObject so = new SerializedObject(playerInteraction);
|
||||
so.FindProperty("workPower").floatValue = playerData.manpower;
|
||||
so.ApplyModifiedProperties();
|
||||
Debug.Log($"[PlayerPrefabSetup] Updated PlayerInteraction: workPower={playerData.manpower}");
|
||||
}
|
||||
|
||||
EditorUtility.SetDirty(prefab);
|
||||
PrefabUtility.SavePrefabAsset(prefab);
|
||||
Debug.Log($"[PlayerPrefabSetup] Player prefab updated successfully from {playerData.name}");
|
||||
|
||||
Reference in New Issue
Block a user