Hi,
I’m learning the unity from youtube/udemy tutorial projects and i have a question.
In example: i have a cube object and inside of it there is Rigidbody + C# Script. And i wanna access the rigidbody from the script.
Some masters getting the own rigidbody from editor
[SerializeField] private Rigidbody _rigidBody;
And some of other masters getting from the Start function
private RigidBody _rigidBody;
private void function Start()
{
_rigidBody = GetComponent<Rigidbody>();
}