The Rigidbody attached to this GameObject (null if there is none attached).
var rb = GetComponent.<Rigidbody>(); rb.AddForce(1, 1, 1);
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public Rigidbody rb = GetComponent<Rigidbody>(); void Example() { rb.AddForce(1, 1, 1); } }