using GameDevTV.Inventories;
namespace InventoryExample.Control
{
[RequireComponent (typeof(Pickup))]
public class RunOverPickup : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
if(other.CompareTag(“Player”))
{
GetComponent().PickupItem();
}
}
}
}