유니티 C# 인벤토리 드래그 앤 드롭 시스템 간단 구현 Inventory Drag and Drop


유니티 C# 인벤토리 드래그 앤 드롭 시스템 간단 구현 Inventory Drag and Drop

코드 작성 using UnityEngine; using UnityEngine.UI; public class InventoryItem : MonoBehaviour { public string itemName; public Sprite itemIcon; } public class InventorySlot : MonoBehaviour { public int slotIndex; public InventoryItem currentItem; } public class InventoryDragAndDrop : MonoBehaviour { private InventoryItem draggedItem; private Image draggedItemImage; private Transform originalParent; ..


원문링크 : 유니티 C# 인벤토리 드래그 앤 드롭 시스템 간단 구현 Inventory Drag and Drop