Hi,
I am struggling with your event documentation. I have got events working with UCC (OnImpact), but cant figure out if you do things differently in UIS, and not even sure if this is still something that needs to be done through UCC events.
I want an event that fires when a item is equiped, can you please provide complete example as I am completely stuck. This is what I have and nothing is working.
I dont get any debugs so I assume something is not working.
The above code is attached to a gameobject in the scene, so not sure if that's correct.
I am struggling with your event documentation. I have got events working with UCC (OnImpact), but cant figure out if you do things differently in UIS, and not even sure if this is still something that needs to be done through UCC events.
I want an event that fires when a item is equiped, can you please provide complete example as I am completely stuck. This is what I have and nothing is working.
C#:
private void Awake()
{
EventHandler.RegisterEvent<Item , int>(gameObject, "Equipper_OnChange", Equipper_OnChange);
EventHandler.RegisterEvent<Item , int>(gameObject, "OnInventoryEquipItem", OnInventoryEquipItem);
}
private void OnInventoryEquipItem(Item itemIdentifier, int slotID)
{
Debug.Log("The inventory used test " + itemIdentifier + ", " + slotID + " slot#.");
}
private void Equipper_OnChange(Item itemIdentifier, int slotID)
{
Debug.Log("The inventory used " + itemIdentifier + ", " + slotID + " slot#.");
}
I dont get any debugs so I assume something is not working.
The above code is attached to a gameobject in the scene, so not sure if that's correct.