Create a scriptable object for defining item properties.
using UnityEngine;
// Define the base item as a scriptable object
[CreateAssetMenu(fileName = "NewItem", menuName = "Inventory/Item")]
public class Item : ScriptableObject
{
public string itemName;
public Sprite icon;
public bool isStackable;
public int maxStackSize = 1;
public virtual void Use()
{
Debug.Log($"Using {itemName}");
}
}