islandchap — 2017-01-03T16:00:20-05:00 — #1
it says that: Assets/Custom_scripts/rigidbody_addForce.js(3,9): BCE0144: 'UnityEngine.Component.rigidbody' is obsolete. Property rigidbody has been deprecated. Use GetComponent() instead. (UnityUpgradable)
I am using this code:
rigidbody.AddForce(Vector3(0, 0, 10));
I am using Unity 5.5.
Can someone help
islandchap — 2017-01-03T22:40:07-05:00 — #2
lol I just got it to work, I had to update some APIs!
this is the new code:
GetComponent.<Rigidbody>().AddForce(Vector3(0, 0, 10));