[TableList] doesn't seem to work with MonoBehaviours

Issue #689 new
Jakub Arnold created an issue

1. What happened?

I have a simple OdinEditorWindow with a list displaying MonoBehaviours (same happens with SerializedMonoBehaviour) from the scene. The following code defines both the window and the behaviour, but the same seems to happen with any monobehaviour.

The problem is, the TableList doesn’t display any of the fields and each row is blank. Interestingly though, switching from TableList to a list view (using the top right icon on the toolbar as shown in 3) in screenshots) clearly shows that the objects are there.

public class RoomManager : OdinEditorWindow {
    [SerializeField, TableList] private List<Room> _rooms;

    [ButtonGroup, Button, PropertyOrder(-1)]
    private void Refresh() {
        _rooms = FindObjectsOfType<Room>().ToList();
    }
}

public class Room : SerializedMonoBehaviour {
    public string Name;
    public Vector2 Size;
}

2. How can we reproduce it?

Instantiate the RoomManager editor window from the snippet and click on the Refresh button.

3. If screenshots would help explain or demonstrate your issue, please include these.

This is when viewed as a [TableList]

and after switching to the regular list using the toolbar icon

Here’s also a short recording https://gfycat.com/YawningWelloffHyracotherium showing the same thing

4. What version of Unity are you using?

2020.1.2f1

5. What version of Odin are you using? (See "Tools > Odin Inspector > About")

2.1.13

6. Do you have Editor Only mode enabled?

No

7. What operating system are you on?

Windows 10 Pro

Comments (0)

  1. Log in to comment