Inherited abstract method not called

I imlemented a function to simulate flickering, but it’s not being called.

I saw in this thread that functions that return an IEnumerator have to be called as a Corutine which helped for one of the inherited classes but not for the others.

Below is the basic code. Why is the function not being called in the CeilingLampController class?

Thanks beforehand


Edit:
Hi, sorry I tried to simplify the code before posting, but I was careless was careless. I think the code should be better now.

public abstract class AttDevice : MonoBehaviour {
   protected bool flickerMode = true;
   void Update () {        
        if (flickerMode)
        {
            //Debug.Log("Flicker1");
            StartCoroutine(Flicker());            
        }
}
    protected abstract IEnumerator Flicker();
    //Other stuff
}

public class AudioDevice : AttDevice {
    protected override IEnumerator Flicker()
    {
        Debug.Log("flickering3"); //this is executed
        SetDeviceOn(true);
        yield return new WaitForSeconds(1);
        SetDeviceOn(false);
        yield return new WaitForSeconds(1);
    }
}

public abstract class VisualDevice : AttDevice
{
}

public class CeilingLampController : VisualDevice {
    protected override IEnumerator Flicker()
    {
        Debug.Log("Flickering2");//this is not executed
         SetDeviceOn(true);
         yield return new WaitForSeconds(1);
         SetDeviceOn(false);
         yield return new WaitForSeconds(1);
    }
}

The code you posted should not compile. I think you want this code…

if (flickerMode)
{
  StartCoroutine(Flicker());            
}

…to be inside a method, like maybe Start()?