While I still need to add all the individual abilities, I found a way to fully utilize UIS for my ability system by using a combination of unique item categories, item actions and custom code.
The abilities are set up as items within their own categories. For each subcategory I have a custom item action that takes care of CanInvokeInternal() & InvokeActionInternal() and if needed hands over certain variables to a custom AbilityHandler (for example to start a coroutine which overrides the ready status of an ability item within UIS after the time specified within a cooldown attribute has passed).
Similar to the regular inventory I did set up another grid inventory with grid tabs that are limited to the ability item categories. The collection has the purpose "Secondary". All of this seems to be working just as I want to.
I`m currently just struggling a bit with the UI Designer to solve the three following issues that are somewhat related to each other:
1) While my Equipment Grid shows "red" when abilities (and regular items not suitable for a particular slot) are dragged over I do get a "green" feedback when trying to drag an ability item into the regular inventory and vice versa. They don't actually get dropped there due to the correct restrictions, but I cannot fully grasp where I need to change something to also have the highlights for red/green accordingly.
2) When dragging items somewhere, to be able to drop them (and to get the colored restriction feedback in the first place) the mouse cursor itself always needs to be exactly on the border of a particular slot. While some slots register it on multiple borders, many only have one of their four borders actually do something. Here is an example, same session, same item, same slot. Coming from left it shows red exactly when the mouse is on the left border and and would have been droppable if the right item for this slot. Coming from right, even when going further over the slot, still nothing is registered at all. This also applies to the case when I want to grab something within the slots.
3) The Item Hotbar correctly accepts both regular items as well as abilities (which is not surprising, considering both types within UIS simply are items). I couldn't find a proper solution though yet in regards to visualizing a cooldown. The easy way would be to simply override the icon of an item or ability that currently is not ready and then override it again, when the cooldown is over. I would prefer to not go this route though and instead have some kind of overlay like this:
Before investing even more time to figure out a solution for this, I just wanted to ask first, if the UI designer or UIS in general do provide anything that could be utilized for this purpose? It could after all also apply for regular items like potions etc.
Thanks a lot for any kind of support.
The abilities are set up as items within their own categories. For each subcategory I have a custom item action that takes care of CanInvokeInternal() & InvokeActionInternal() and if needed hands over certain variables to a custom AbilityHandler (for example to start a coroutine which overrides the ready status of an ability item within UIS after the time specified within a cooldown attribute has passed).
Similar to the regular inventory I did set up another grid inventory with grid tabs that are limited to the ability item categories. The collection has the purpose "Secondary". All of this seems to be working just as I want to.
I`m currently just struggling a bit with the UI Designer to solve the three following issues that are somewhat related to each other:
1) While my Equipment Grid shows "red" when abilities (and regular items not suitable for a particular slot) are dragged over I do get a "green" feedback when trying to drag an ability item into the regular inventory and vice versa. They don't actually get dropped there due to the correct restrictions, but I cannot fully grasp where I need to change something to also have the highlights for red/green accordingly.
2) When dragging items somewhere, to be able to drop them (and to get the colored restriction feedback in the first place) the mouse cursor itself always needs to be exactly on the border of a particular slot. While some slots register it on multiple borders, many only have one of their four borders actually do something. Here is an example, same session, same item, same slot. Coming from left it shows red exactly when the mouse is on the left border and and would have been droppable if the right item for this slot. Coming from right, even when going further over the slot, still nothing is registered at all. This also applies to the case when I want to grab something within the slots.
3) The Item Hotbar correctly accepts both regular items as well as abilities (which is not surprising, considering both types within UIS simply are items). I couldn't find a proper solution though yet in regards to visualizing a cooldown. The easy way would be to simply override the icon of an item or ability that currently is not ready and then override it again, when the cooldown is over. I would prefer to not go this route though and instead have some kind of overlay like this:
Before investing even more time to figure out a solution for this, I just wanted to ask first, if the UI designer or UIS in general do provide anything that could be utilized for this purpose? It could after all also apply for regular items like potions etc.
Thanks a lot for any kind of support.