How do i add parameter to OnDrop?
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEditorInternal.Profiling.Memory.Experimental;
using UnityEngine;
using UnityEngine.EventSystems;
public class ToolBarSlot : MonoBehaviour, IDropHandler
{
ItemSO item;
public void OnDrop(PointerEventData eventData, ItemSO item)
{
if (transform.childCount == 0)
{
if (Check(item) == true)
{
InventoryItem inventoryItem = eventData.pointerDrag.GetComponent<InventoryItem>();
inventoryItem.parentAfterDrag = transform;
}
}
}
public bool Check(ItemSO item)
{
if (item.type == ItemType.Laser)
{
return true;
}
return false;
}
}
Says IDropHandler does not implement interface member