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

Gets references to all components of type T on the same GameObject as the component specified, and any parent of the GameObject.