var rigidbody : Rigidbody
Description描述
The Rigidbody attached to this GameObject (null if there is none attached).
Rigidbody附加到GameObject(游戏物体)(如无附加则为空)。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
rigidbody.AddForce(1, 1, 1);
}
}
rigidbody.AddForce(1, 1, 1);