how to get a component from script code example Example: unity gameobject.getcomponent rb = GetComponent<Rigidbody>();