rigidbody unity3d code example Example 1: unity rigid body variable public Rigidbody rigidbody; Example 2: unity rigidbody private Rigidbody rigidbody