InlineEditorAttribute displays spurious error

Issue #319 resolved
Franklin Ross created an issue

Gush

First up I just want to gush a bit first, Odin is one of the most awesome things I've ever bought from the asset store. Unfortunately it's given me such a taste for what life is like when inspectors are easy, that I now want a billion new/updated attributes. I've been trying to restrain myself from reporting them because you seem have a fair bit of work here already.

Issue

For this particular issue, I added the InlineEditorAttribute to a custom IList<T> that I've made, and the editor actually seems to work fine but also displays an error message telling me everything is not fine.

Capture.PNG

The error is not displayed when T isn't an interface, so I guess that's what's causing it. The member isn't serialised so it's not a problem for my code, but it is handy to have it displayed here in the inspector. The inspector actually renders it fine so it seems like the error shouldn't be displayed in this case? Or perhaps it could only display the error if it actually finds an item it can't display?

Some details: * Unity version: 2017.3.1p1 * Odin version: 1.0.6.3 (I had to select 1.0.6.2 from the version list because that seems to be the latest).

Comments (2)

  1. Bjarke Elias

    Hey Franklin,

    Thanks a lot for reporting it, we always appreciate bug reports, so don't hold back :)

    That one is gone in the 1.1 (which will be our next larger patch)

    Until then you can the SuppressInvalidAttributeError to get rid of it:

    [InlineEditor]
    [SuppressInvalidAttributeError]
    public List<ISomeInterface> list;
    
  2. Log in to comment