Hi! is it somehow possible to have coroutine execute in lambda? some syntax like this: Code (csharp): { () => yield return new WaitForSeconds(1f); Debug.Log("Executed after pause"); }
no, C# does not allow yield expressions inside lambdas or anonymous methods. http://blogs.msdn.com/b/ericlippert...ks-part-seven-why-no-anonymous-iterators.aspx
Even if it were supported it would probably puke on AOT compilers. That being said, if Unity ever gets .NET 4 support, assuming you're looking for some Async type functionality, maybe we'll be able to use the Parallels library (like Parallel.ForEach) which takes in a lambda / anonymous method and could likely accomplish what you're trying to accomplish...