お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Closetype | 見つけるコンポーネントのタイプ |
親のコンポーネントを探します
有効なコンポーネントが見つかるまで上に向かって(親の親)再帰します。それでも見つからない場合は null を返します
// Disable the spring of the first HingeJoint component // found on any parent object. var hinge : HingeJoint; hinge = gameObject.GetComponentInParent(HingeJoint); hinge.useSpring = false;
親のコンポーネントを探します
有効なコンポーネントが見つかるまで上に向かって(親の親)再帰します。それでも見つからない場合は null を返します