#pragma strict
var FirstForce:Vector3 = Vector3(300, 300, 0);
function Start () {
rigidbody.AddForce(FirstForce);
}
function Update () {
}
というプログラムをボールを動かすためにやったのですがうまくいきません
エラーコードは
Assets/Ball.js(6,9): BCE0144: 'UnityEngine.Component.rigidbody' is obsolete. Property rigidbody has been deprecated. Use GetComponent<Rigidbody>() instead. (UnityUpgradable)
と
Assets/Ball.js(6,9): BCE0144: 'UnityEngine.Component.rigidbody' is obsolete. Property rigidbody has been deprecated. Use GetComponent<Rigidbody>() instead. (UnityUpgradable)です