[Mono-dev] Extract method name from IEnumerator

Joachim Ante joe at unity3d.com
Sat Oct 4 09:26:37 EDT 2008


Hi,

Is there any way to extract the method name from an IEnumerator  
object when using iterators?

Our users do this:

IEnumerator MyMethod ()
{
	yield return 0;
	....	
}

StartCoroutine(MyMethod ());

StartCoroutine passes the IEnumerator down to c code and schedules  
MoveNext from C code.



We use this kind of setup a lot for game code. This all works great,  
the problem is profiling.

When profiling the method name that shows up is always MoveNext. I  
would like to replace MoveNext with the actual method name.

I am looking for a way to extract it using the embedding API. Relying  
on specific implementation details of the gmcs is perfectly fine.

Best regards,
Joachim Ante


More information about the Mono-devel-list mailing list