The same field name is serialized multiple types

Here is my code:

I have a base class :

public class NodeSO : ScriptableObject
    public virtual string NodeType { get; }
    public virtual string Name { get; }
    public virtual Vector2 NodePosition { get; set; }
    public virtual string Guid { get; set; }
    public virtual List<NodeSO> Children { get; set; }
    public virtual NodeSO Parent { get; set; }


… and derived class.

public class OutputPortsNode : NodeSO
    public override string NodeType => GetType().ToString();
    public override string Name => "Output Port Node";
    [field:SerializeField] public override Vector2 NodePosition { get; set; }
    [field:SerializeField] public override string Guid { get; set; }
    [field:SerializeField] public override NodeSO Parent { get; set; }
    [field:SerializeField] public override List<NodeSO> Children { get; set; }

    public void OnEnable()
        Children = new List<NodeSO>();

As seen on screenshot, only 4 properties giving me error. Correct me if I am wrong but reason for that is properties Name and NodeType have getters only so are not serialized? But why other properties got this error? I cant serialize virtual members?

Maybe I’m wrong but when you declare a property as public it gets automatically serialized. If you also try to serialize them (even from a child class), Unity will try to expose each variable twice.

Also I think there’s no need to declare the variables as virtual since any child class will inherit all the parent’s variables. Just declare them as public in the parent (if that’s what you’re looking for) and do nothing on the child class. But maybe there is a special case where you can take advantage of this type of declaration?