how to use getcomponent in unity code example Example: unity gameobject.getcomponent rb = GetComponent<Rigidbody>();