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