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

Returns the Component of type in the GameObject or any of its parents.