[BUG] Reorderable list element can't be dragged
What happened?
Hi, I have array of serializable elements and after upgrading package version (I am pretty sure it worked before) there is no option to drag elements to change order. The reason is foldout arrow in the same position as drag area.
Package Version
1.6.1
Unity Version
2022.3.21
Hi. It looks different from my environment. Are you using an editor extension?
Below is a rendering in 2022.3.21f1 in my environment.
It would also be helpful if you could attach a screenshot of the entire SubclassSelector as drawn in the Inspector.
I don't think there is custom drawer or editor that would affect rendering of this arrow.
I made separate serializable class to test with new component and I have got the same result, everything is rendered correctly except foldout arrow.
So the last thing in my mind that could possibly cause this bug in my project is NaughtyAttributes package.
My test code:
public class PlaneTest : MonoBehaviour
{
[SerializeReference, SubclassSelector] public TestConfig[] configurations;
}
[System.Serializable]
public abstract class TestConfig
{
public abstract float Speed { get; }
public abstract void Execute();
}
[System.Serializable]
public class FirstConfig : TestConfig
{
public float damage = 1f;
public float knockback = 0f;
public override float Speed => 1f;
public override void Execute()
{
}
}
I have the same problem.
Commenting out the following code solved the problem.
https://github.com/mackysoft/Unity-SerializeReferenceExtensions/blob/main/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs#L85
Package version: 1.6.1 Unity version: 2022.3.42f1, 2022.3.21f1 (mac apple silicon)
It's broken in 2022.3, but after upgrading to unity 6 it works properly. However in case you can't upgrade, it's still possible to move element if you drag by left edge - the first pixel of element.