I’ve come across a situation where I have two different scriptable object types serialized in the same class and because one inherits from the other as so,
public class BaseArmorType : BaseResistanceState
public class BaseResistanceState : ScriptableObject
When I click on the object that is of BaseResistanceState type, I am given the option of selecting BaseArmorType objects as that object in the editor.
[SerializeField] protected BaseArmorType m_ArmorType; [SerializeField] protected BaseResistanceState m_ResistanceState;
Is there a way to prevent this? I not only find it kind of bothersome, but the BaseArmorType class has a different function that is used when processing damage and if it were to be the one selected it would bypass the armor functionality and purely process it as a BaseResistanceState. But mostly, it’s bothersome. So much so, if there is no way, I will probably use two different class types. Simply to avoid the possibility.
Thanks in advanced.