In a previous tutorial, in order to disable the gravity, we first cached a reference to a rigidbody (i.e. created a Rigidbody type variable) and then used .useGravity on this variable. Here is how it kind of looked:
Rigidbody rigidBody;
rigidBody = GetComponent();
rigidBody.useGravity = false;
However in this tutorial, in order to disable the movement script, we use the GetComponent() and use .enabled directly on this. And here is how this one kind of looks:
GetComponent.enabled = false;
Both options work but I would like to know the difference between these two options. Thank you.