Version: 5.6
Obsolete public Component rigidbody ;

説明

GameObject にアタッチされている Rigidbody (読み取り専用)。 (アタッチされていない場合は null)。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public GameObject other; public Rigidbody rb = other.GetComponent<Rigidbody>(); void Example() { rb.AddForce(1, 1, 1); } }