هر کاری کردم نشد که پریدن اجرا بشه هم تو یونیتی و هم تو ویژوال... مثل شما انجام دادم جواب بدید ممنون می شم

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class PlayeR : MonoBehaviour
{
public Rigidbody2D rb;
public float jumpH;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
print("h");
if (Input.GetKeyDown(KeyCode.Space))
{
rb.AddForce(Vector2.up* jumpH, ForceMode2D.Impulse);
}
}
public void jumping()
{
rb.AddForce(Vector2.up * jumpH, ForceMode2D.Impulse);
}
}
//کد های من