Unity inheritance problems

Hello!
Here is my problem. I have an enemy which consists of:

AICombat - this is the main class that inherits from
```csharp
*public class AICombat : MonoBehaviour
{

    [HideInInspector]
    public NavMeshAgent agent;
    [HideInInspector]
    public Animator anim;
    [HideInInspector]
    public int dyingTypeRandom;
    //[HideInInspector]
    public bool isCombatMode, isIdleMode;

    public int parentRoomId, id;


    void Awake()
    {

        dyingTypeRandom = Random.Range(0, 3);

    }

    public void ActivateCombatMode()
    {
        isCombatMode = true;
    }

    public void DeactivateCombatMode()
    {
        isCombatMode = false;
    }

    public void ActivateIdleMode()
    {
        isIdleMode = true;
    }

    public void DeactivateIdleMode()
    {
        isIdleMode = false;
    }



}*

```
2 classes are inherited: AICombatController && AIDamageController

This is how it looks in the editor:

As seen in the picture, the first class displays the correct id and the second does not.
I set the ID from the class that deals with spawn objects. It looks like this:

csharp* *enemy.AICombat.parentRoomId = roomId; enemy.AICombat.id = enemy.Id;* *

That is, in fact, I set the data only in AICombat. Why do the heirs get different data? More precisely, why the second heir can not get the data?

enemy.AICombat only references one of those components, not both, regardless of their parentage. You either need to use an array/list to reference all AICombat derived components or rethink your structure.