AlexeyTaranov / SerializeReferenceDropdown

(Unity) Editor dropdown for SerializeReference Attribute with Copy/Paste
MIT License
89 stars 7 forks source link

Drawer issues when selecting polymorphism class in Unity 2022.3.0f1 #15

Closed Agnate closed 1 year ago

Agnate commented 1 year ago

Hi, I was excited to find this library but I'm having an issue. Seems on Unity 2022.3.0f1 I can't get the dropdown option I select to show up. I can see my polymorphism class in the dropdown when I put my array in a ScriptableObject:

image

But after I select it a class, I just get a null entry:

image

I tried recreating the example you had (IShape, Circle, Rectangle, add an array to a MonoBehaviour), but it produced the same results.

However, I noticed something. When I recreated your example in a new project, I could get the item to appear correctly after adding a second item to my array.

Empty list: image

Add a Rectangle: image

Shows as null: image

Click the Add button and it appears: image

AlexeyTaranov commented 1 year ago

@Agnate Is it windows os editor? Can you test on 2022.3.4? Can you test this on IMGUI inspector? Edit -> Project Settings -> Editor -> Use IMGUI Default Inspector It is only ui elements inspector problem? Unfortunately, I only have macos editor and can't reproduce this bug(

Agnate commented 1 year ago

Yep changing to IMGUI seems to fix it! Thanks.

AlexeyTaranov commented 1 year ago

@Agnate Hi. Fixed bug on 0.3.4. version package

Agnate commented 1 year ago

Nice, works without IMGUI checked now. Thanks for the quick fix!