[Bug] Item Slot Collection View breaks when selected before entering play mode

ParanoidAndroid

New member
Tested on a new empty project in Unity 2021.3.1f1, UIS version 1.2.9

This seems like a very weird bug.
Hopefully this is just an editor-related issue and not a gameplay one, but it took me way too long to figure out why my equipment slots were "randomly" refusing to listen to my input.
It turns out that selecting the Item Slot Collection View game object was breaking things...

Reproduction steps:
Open the 6 Hotbar featured demo scene.
Enter play mode and the equipment hotbar should be working as expected.
Now exit play mode and select the game object that has the Item Slot Collection View (should be named "Equipment Item View Slot Container").
Select any other game object.
Start play mode again.
You won't be able to drag any items onto the equipment hotbar.
If there are any items in its respective inventory collection, you won't be able to drag them out either.
Exit and enter play mode again.
The hotbar should now be working again.

If you enter play mode with the Item Slot Collection View game object selected, the hotbar will be broken each time.
Once you exit and select another game object, you still have to enter and exit play mode one more time to get the hotbar working again.

Something else I noticed was that the slot cursor wasn't getting assigned when the hotbar broke, but manually assigning it didn't seem to make a difference.
No idea if that extra detail is relevant.
 
I never encoutered this issue before because I had this project setting turned off.
1656315561946.png
As soon as I turned it on it stopped working correctly.
So something somwhere does not get reinitialized properly when using this feature.

It took awhile but it is now finally fixed. I'm still not quite sure why it wasn't working properly before. It required me to make changes in a few places between the Inspector and the component initialization, so I think it's best if you wait for the next update rather than I try to explain all the code changes I made.

At least it is easily avoidable.

Thank you for the detailed bug report it really helped find the issue faster
 
Top