rb = this.GetComponent<Rigidbody>(); code example
Example: get rigidbody component unity
//The Variable
Rigibody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
//The Variable
Rigibody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}