Store Item details in own class
Easier to handle i think See example:
public class Consumable : Item
{
public ConsumeEffects Effects { get; set; }
public void Use(GameObject target)
{
var healthComponent = target.GetComponent<HealthComponent>();
if (healthComponent != null)
{
healthComponent.Heal((int)Effects.Health);
}
}
public struct ConsumeEffects
{
public int? Health { get; set; }
}
}