Abstract generic UnityEngine.Objects are not shown in inspector

Issue #763 resolved
Artem Perepelitsa created an issue

What happened?
When an abstract generic UnityEngine.Object type (e.g. public abstract GenericTest<T> : ScriptableObject { } ) is referenced in [SerializeField], it appears in Inspector by default but not when Odin is enabled in Inspector.

How can we reproduce it?

  1. Create a script with the following content:
using System;
using UnityEngine;

public abstract class GenericTest<T> : ScriptableObject { }

2. Reference it in a MonoBehaviour:

public class TestBehaviour : MonoBehaviour
    [SerializeField] private GenericTest<bool> _testField;

3. Check how the field looks in the inspector.

4. In Tools → Odin Inspector → Preferences, turn off 'Enable Odin In Inspector'.

5. Check the inspector again.

Actual Result: the field is absent when Odin is enabled in Inspector.

Expected Result: the field is shown just like when Odin is disabled.

What version of Unity are you using?

Do you have Editor Only mode enabled?

What operating system are you on?
Windows 10

Comments (4)

  1. Log in to comment