Can I make a Task wait for an IEnumerator to end? I have a Task that in one point starts an IEnumerator, but i want the task to wait until the IEnumerator end. (its an IEnumerator that plays an animation , something like "while(x != y) {Do something}")
private async Task TaskNAME()
{
code
code
code
StartCoroutine(IEnimeratorName(VALUE));
}
IEnumerator IEnimeratorName()
{
while (valuee != targerValue)
{
move recttransform
yield return null;
}
}
Id like to await for the IEnimeratorName to finish and only then return the TaskNAME