static void Execute<T> (string funcName, GameObject root) where T : Component
{
T[] comps = root.GetComponents<T>();
foreach (T comp in comps)
{
MethodInfo method = comp.GetType().GetMethod(funcName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
if (method != null) method.Invoke(comp, null);
}
Transform t = root.transform;
for (int i = 0, imax = t.childCount; i < imax; ++i)
Execute<T>(funcName, t.GetChild(i).gameObject);
}