unity get velocity of gameobject

C#
Rigidbody rb = GetComponent<Rigidbody>();
rb.velocity; // Velocity of gameObject (Vector3)
Source

Also in C#: