>>575
スマホからなんで動く保証はないしテキトーだがこんな感じかね?
ツリー構造が動的に変化するとか子が複数いる可能性があるなら適宜修正してくれ

public class A:MonoBehaviour{
public A child=null;
public bool IsRoot=true;

void Start(){
//親を探す
A parent = transform.parent.gameObject.GetComponent<A>();
//親がいなければIsRootフラグを立てておく、いるならIsRootフラグを倒して親に自分が子である事を登録する
if(parent==null){
this.IsRoot=true;
}else{
this.IsRoot=false;
parent.child=this;
}
}
void Update(){
//親がいない場合のみ自分でFooを呼ぶ
if(IsRoot)this.Foo();
}
private void Foo(){
//何かする
//子がいるなら子のFooを呼ぶ
if(child!=null)child.Foo();
}
}