Disable Game object, Enable other Game objects after 5 seconds to show progress

Hi
I want to disable game object and enable other object and do this for all object in 5 second for each one to show progress, i did this by adding a script to ImageTarget with this code:

public class cv : MonoBehaviour
{
    
    void Start()
    {
        StartCoroutine(LateCall());
    }

    IEnumerator LateCall()
    {

        Obj1.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj1.SetActive(false);
        Obj2.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj2.SetActive(false);
        Obj3.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj3.SetActive(false);
        Obj4.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj4.SetActive(false);
        Obj5.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj5.SetActive(false);
        Obj6.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj6.SetActive(false);
        Obj7.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj7.SetActive(false);
        Obj8.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj8.SetActive(false);
        Obj9.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj9.SetActive(false);
        Obj10.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj10.SetActive(false);
        Obj11.SetActive(true);
        yield return new WaitForSeconds(5f);
        Obj11.SetActive(false);
        Obj12.SetActive(true);
    }


    [SerializeField] private GameObject Obj1;
    [SerializeField] private GameObject Obj2;
    [SerializeField] private GameObject Obj3;
    [SerializeField] private GameObject Obj4;
    [SerializeField] private GameObject Obj5;
    [SerializeField] private GameObject Obj6;
    [SerializeField] private GameObject Obj7;
    [SerializeField] private GameObject Obj8;
    [SerializeField] private GameObject Obj9;
    [SerializeField] private GameObject Obj10;
    [SerializeField] private GameObject Obj11;
    [SerializeField] private GameObject Obj12;
   
}

What is the problem?

@Bieere @fafase
Thanks!

First of all, try to put the GameObject variables before the IEnumerator (i suggest you to place it at the top (before the start). Then are you sure your GameObjects are assigned? and Do you get any errors?

There has got to be an easier way than this.

That code is hard to look at.

Have you tried using a list, maybe a queue, to achieve your goal?

Add the objects to a list. Start a Coroutine like,

 IEnumerator FlashObjects
{
    I = 0;
    while(I < list.count)
    {
     list*.setActive(true);*

if(I - 1 >= 0 && I - 1 <= list.count)
{
list[I-1].setactive(false);
}
I++;
yield return new wait for seconds (5);
}
}
This should work and looks a lot nicer and cleaner , in my humble opinion, but im a rookie coder.