- edited description
Abstract generic UnityEngine.Objects are not shown in inspector
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?
- Create a script with the following content:
using System;
using UnityEngine;
[Serializable]
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?
2020.2.4f1
Do you have Editor Only mode enabled?
No
What operating system are you on?
Windows 10
Comments (4)
-
reporter -
reporter - edited description
-
reporter - edited description
-
- changed status to resolved
Thanks for reporting this issue. It has already been fixed in patch 3.0.4, as you can see in our patch notes.
- Log in to comment