2026-04-11 에러수정

This commit is contained in:
2026-04-11 09:04:58 +09:00
parent 00b832296b
commit ba93dc6d2f
57 changed files with 378 additions and 23 deletions

View File

@@ -352,14 +352,14 @@ public void SpawnItemToWorld(ItemInstance dropItem)
Vector3 dropPosition = player != null ? player.transform.position + player.transform.forward * 1.5f + Vector3.up * (dropItem.Data.WorldScale.y * 0.5f + 0.25f) : Vector3.zero;
// 빈 게임오브젝트를 생성하고 WorldItem 컴포넌트를 붙임
GameObject dropObj = new GameObject($"{dropItem.Data.ItemName}_Dropped");
GameObject dropObj = new GameObject($"{dropItem.Data.EntryName}_Dropped");
dropObj.transform.SetParent(GameManager.Instance.DynamicObjectsField.transform);
dropObj.transform.position = dropPosition;
WorldItem worldItem = dropObj.AddComponent<WorldItem>();
worldItem.SetItem(dropItem); // SetItem으로 데이터 주입 및 모델 생성
Debug.Log($"{dropItem.Data.ItemName} {dropItem.CurrentStack}개를 필드에 버렸습니다.");
Debug.Log($"{dropItem.Data.EntryName} {dropItem.CurrentStack}개를 필드에 버렸습니다.");
}
public void DropItemFromSlot(int slotIndex)