Component-GetComponentInParent - Unity スクリプトリファレンス

Gets a reference to a component of type T on the same GameObject as the component specified, or any parent of the GameObject.