The OnHotspotInteract event will be called when using an Inventory item on a Player's Hotspot. You can compare the Hotspot with that of the Player, and the type of interaction with GetButtonInteractionType:
using UnityEngine;
using AC;
public class PlayerItemEvent : MonoBehaviour
{
public Hotspot playerHotspot;
void OnEnable() => EventManager.OnHotspotInteract += OnHotspotInteract;
void OnDisable() => EventManager.OnHotspotInteract -= OnHotspotInteract;
void OnHotspotInteract(Hotspot hotspot, AC.Button button)
{
var buttonType = hotspot.GetButtonInteractionType(button);
if (hotspot == playerHotspot && (buttonType == HotspotInteractionType.Inventory || buttonType == HotspotInteractionType.UnhandledInventory))
{
Debug.Log("Item was used on Player");
}
}
}
Comments
The OnHotspotInteract event will be called when using an Inventory item on a Player's Hotspot. You can compare the Hotspot with that of the Player, and the type of interaction with GetButtonInteractionType: