for (mMethod = null; type != null; )
{
try
{
mMethod = type.GetMethod(mMethodName, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
if (mMethod != null) break;
}
catch (System.Exception) { }
#if UNITY_WP8
// For some odd reason Type.GetMethod(name, bindingFlags) doesn't seem to work on WP8...
try
{
mMethod = type.GetMethod(mMethodName);
if (mMethod != null) break;
}
catch (System.Exception) { }
#endif
type = type.BaseType;
}