- Code: Select all
public class MyChildClass : MyBaseClass
{
// This works correctly in the inspector.
[Articy.Unity.ArticyTypeConstraint(typeof(Articy.MyProject.TextObject))]
[SerializeField]
private ArticyRef myReferenceInChild;
}
public abstract class MyBaseClass : MonoBehaviour
{
// This shows in the inspector, but doesn't constrain to the given type,
// instead it shows all ArticObjects.
[Articy.Unity.ArticyTypeConstraint(typeof(Articy.MyProject.TextObject))]
[SerializeField]
private ArticyRef myReferenceInBase;
}
I'd be happy, if this was possible. Thank you!
PS: Of course I can just make my fields protected as a workaround, but I thought it's probably feasible to also reflect over the base type when getting the SerializedObject's fields in the Articy PropertyDrawer.