Skip to content

[BUG] Reorderable list element can't be dragged #79

Closed

Description

@Qriva

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.
obraz

Package Version

1.6.1

Unity Version

2022.3.21

Activity

  1. mackysoft commented on Nov 24, 2024

    @mackysoft
    Owner

    Hi. It looks different from my environment. Are you using an editor extension?
    Below is a rendering in 2022.3.21f1 in my environment.
    image
    It would also be helpful if you could attach a screenshot of the entire SubclassSelector as drawn in the Inspector.

  2. Qriva commented on Nov 24, 2024

    @Qriva
    Author

    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.
    GIF 24 11 2024 15-57-49
    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()
        {
        }
    }
  3. naoya-maeda commented on Apr 4, 2025

    @naoya-maeda

    I have the same problem.

    Image

    Commenting out the following code solved the problem.

    https://github.com/mackysoft/Unity-SerializeReferenceExtensions/blob/main/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs#L85

    Image

    Package version: 1.6.1
    Unity version: 2022.3.42f1, 2022.3.21f1 (mac apple silicon)

  4. Qriva commented on Apr 4, 2025

    @Qriva
    Author

    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.

  5. mackysoft commented on Jan 18, 2026

    @mackysoft
    Owner

    I have implemented a temporary solution by embedding directives specific to 2022.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions