Running Coroutines

How could I make a coroutine wait until it finishes to run another coroutine?

What i want to do is scale a gameobject’s width first and then scale it’s height next.
But from what it seems, it scales width and height at the same time.

void Example(){
StartCoroutine (SmoothScale (gobject, new Vector3 (0.6f, 0, 0),7f));
StartCoroutine (SmoothScale (gobject, new Vector3 (0, 1f, 0),4f));
}

IEnumerator SmoothScale(GameObject source,Vector3 scaleSize, float scaleLimit){
        float startTime = Time.time;
        while (source.transform.localScale.x <scaleLimit) {
            source.transform.localScale += scaleSize;
            yield return null;
        }
        yield return new WaitForSeconds (1f);
    }

I would not use a coroutine for this purpose. Additionally, the code you have written inside will fluctuate depending on performace, fundamentally you should be mapping your transformations to Time.deltaTime, so that they scale properly independant of framerate.

Anyway, onto the core of the question. Calling a coroutine from inside a coroutine looks like this:

void Start()
{
    StartCoroutine(SomeCoroutine());
}

IEnumerator() {
    yield return new WaitForSeconds(1f);
    yield return StartCoroutine(NestedCoroutine());
}

IEnumerator NestedCoroutine()
{
    yield return null;
}

I’m interested on the fluctuate thingy… Can i get an insight about it? What would be a better replacement for it?