Version: 2017.3
Obsolete public Component rigidbody ;

説明

The Rigidbody attached to this GameObject. (Null if there is none attached).

using UnityEngine;
using System.Collections;

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