- Home /
Question by
corrivai · Sep 05, 2017 at 08:08 AM ·
unity 5coroutineyieldienumeratorreturn value
Coroutine error with result
Hi, i have this method:
public void demo()
{
StartCoroutine(Show(""));
}
public IEnumerator Show(string sw)
{
var method = GetShowString(user, sw, this);
yield return StartCoroutine(method);
List<object> listRes = method.Current as List<object>;
if (listRes.Count != 0)
{
//
}
else
{
//
}
}
But after "yield return StartCoroutine(method);", the method ends and ignores what is there after Can you help me? Thank you
Comment
Answer by akillingbeck · Sep 05, 2017 at 08:28 AM
This compiles? Or have you copy pasted wrong? Coroutine is spelt incorrectly here:
public void demo()
{
StartCoroutnie(Show(""));
}