I am wanting a coroutine to finish a while loop then call DoSomething(), but DoSomething() is getting called before its finished.
while (time > 0.0f)
{
time -= Time.deltaTime;
transform.localScale = Vector3.Lerp(targetScale, originalScale, time / originalTime);
yield return 0;
}
DoSomething();