Hey,
I have an item upgrade system where the player clicks on an "Ancient Scroll" in the inventory and then clicks another item to enchant that item (I have a custom action for it)
While selecting a target I need to be able to make all the ItemViewSlots unclickable in the inventory so when I click on an item it doesn't get consumed or doesn't get equipped or something.
I created a CustomItemViewSlot class that inherits from ItemViewSlot and overrides the "OnPointerClick" method to block the click if my singleton manager has the boolean "BusyUpgrading" as true.
This works, but I don't know if it's optimal as I had to change the "m_ItemView" variable from internal to public on the ItemViewSlot class to get it to work.
Is there a better way?
I have an item upgrade system where the player clicks on an "Ancient Scroll" in the inventory and then clicks another item to enchant that item (I have a custom action for it)
While selecting a target I need to be able to make all the ItemViewSlots unclickable in the inventory so when I click on an item it doesn't get consumed or doesn't get equipped or something.
I created a CustomItemViewSlot class that inherits from ItemViewSlot and overrides the "OnPointerClick" method to block the click if my singleton manager has the boolean "BusyUpgrading" as true.
This works, but I don't know if it's optimal as I had to change the "m_ItemView" variable from internal to public on the ItemViewSlot class to get it to work.
Is there a better way?