I answered the same question a couple of times, however i can’t find one at the moment ^^
Unfortunately Unity doesn’t support inheritance in custom classes when it comes to serialization. Unity can only serialize it’s own types eg, types derived from UnityEngine.Object, most native types (int, float, string, …) and some special types like Vector2/3/4, NetworkViewID, Quaternion, … . The only classes you can use to derive your own classes from are MonoBehaviour and ScriptableObject.
MonoBehaviours can be part of a scene serialization, so when it’s attached to an object in a scene, or as part of a prefab / asset serialization. ScriptableObjects can only be serialized as assets. These types can be serialized on it’s own.
Custom serializable classes (classes with the System.Serializable attribute) are serialized along with a referencing MonoBehaviour or ScriptableObject. This behaves more like a struct-relationship. The custom class becomes a part of the MonoBehaviour / ScriptableObject.
Unity serialized / deserializes those classes based on the variable type that references the class. So if your MonoBehaviour contains a List of CustomClassBase references, all instances will be serialized / deserialized as CustomClassBase.
Unity serializes custom classes into the referencing MonoBehaviour, so when you have an instance of your custom class and have two or more references in MonoBehaviour classes to this instance, you will end up with multiple seperate instances upon deserialization.
The only way to support inheritance is to use MonoBehaviours or ScriptableObjects. ScriptableObjects are usually the first choice, however they need to be saved as an asset, so there’s some editor code required. MonoBehaviours can easily put on scene objects or saved along with prefabe (might also require some editor code).
Keep in mind that every UnityEngine.Object has hideFlags which are quite handy when it comes to hide certain objects or to prevent the serialization of temporal scene objects. The best example is the SceneView camera. You’ll never see the camera but it’s attached to an invisible GameObject in the scene. This GO and all it’s components are marked with HideAndDontSave