• We are looking for a content creator to help market our assets and a future unannounced project. More details are on this page.

Bug when changing the hierarchy of abilities

EVG

Member
1. FPC 2.4
2. Unity 2021.1.24f1
3. Bug when changing the hierarchy of abilities. Does not update when moving abilities through the hierarchy. Corrected by pressing Play.
Video:
 
Last edited:

Justin

Administrator
Staff member
I am not able to reproduce this. Not that it should matter, but it doesn't look like you are using a prefab? Are you able to repro it within the demo scene of a fresh project?
 

EVG

Member
This is not a prefab.
I just created a new project, opened the demo scene and the problem is also present.
 

Justin

Administrator
Staff member
Thanks. I updated to the latest version of 2021.1 and was able to reproduce it. It looks like the ReorderableList changed. I found a workaround and will send you a new version to test. This has all of the issues that you reported fixed.

Edit: my workaround didn't work. It's a problem in the latest version of Unity. I've submitted a bug report to them with a minimal repro scene.
 
Last edited:

Wyldhunt

New member
Is there any update on this?
I'm having this issue with the latest UCC and Unity 2021.2.3f1
When I reorder the list, the item I drop gets placed into a seemingly random position in the list.
Would a potential workaround be to add +/- buttons by each that just move the item 1 slot up/down?

Edit: It's not random. It actually fails the first try, but works if I try to move the same item a second time...
So, it's workable, if a tad annoying.
 
Last edited:

Justin

Administrator
Staff member
This is a problem with Unity. I have submitted the bug report but do not have an update.
 

Justin

Administrator
Staff member
Unfortunately this is in the core ReorderableList code so I wasn't able to find a workaround. I will take another stab at it though.

Long term I have started to convert the editor over to UIElements and have created our own ReorderableList. This will ensure it will work in the future.
 

Dreampriest

New member
Is there a reason abilities are serialized using a custom system? If abilities were regular components it would take a lot of complexity out of the system and would also allow for prefab inheritance.
 

Justin

Administrator
Staff member
Before Unity introduced the [SerializedReference] attribute their serialization did not support inherited objects like the Ability class. In the UIElements version, which will be version 3, I am now using [SerializedReference] and no longer serializing the abilities separately. So far it's working well.

With that said, I did find a workaround for this so it'll be fixed in Unity 2021.2 and later in the update going out next week.
 

badical

New member
I'm also experiencing this using UCC 2.4.5 and Unity 2021.2.7f1 and 2021.2.8f1.

Dragging abilities up and down the list almost always results in an order I did not expect. It's a battle to get it correct :/

I can post a video if needed, but EVG's video is exactly what I'm experiencing.
 

Justin

Administrator
Staff member
Ugh, I thought that this was fixed. I really wish Unity didn't change the ReorderableList. My bug report is still pending with Unity.
 

Justin

Administrator
Staff member
No updates - I'll update this post when there is. In version 3 we are using UIElements so this is not an issue
 
Top