Diğer arkadaşa kodları atmıştım tam anlayamadım onun üzerine yazabilirseniz çok sevinirim
public class NewBehaviourScript : MonoBehaviour
{
public rigidbody2d rb;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame...