Need help In creating android game with UI buttons ?Please Help

I have made these buttons to make this game’s controls compatible for android and below is my playermovement script I want to make my UI buttons in screen such that when I use buttons it feels like controlling through two keys of key board

using UnityEngine;
using UnityEngine.SceneManagement;
using UnityStandardAssets.CrossPlatformInput;


public class PlayerMovement : MonoBehaviour {

    //This is a reference to the Rigidbody component called "rb"
    public Rigidbody rb;

    
    public float forwardforce = 200f;
    public float sidewaysforce = 500f;
    public float upwardforce = 600f;
    public int Start()
    {
        Scene currentScene = SceneManager.GetActiveScene();
        return currentScene.buildIndex;
    }
    



    // We marked this as "Fixed Update"because we are using it to mess with physics
    public void FixedUpdate() {
        rb.AddForce(0, 0, forwardforce * Time.deltaTime);    //Add a forward force 	
       
        if (Input.GetKey("d"))
        {
            
            Debug.Log("Right");
            Right();
           
        }

        if (Input.GetKey("a"))
        {
           
            Debug.Log("Left");
            Left();
        }
        if (Start() == 5)
        {
            if (Input.GetKey("w"))
            {
                rb.AddForce(0, upwardforce * Time.deltaTime, 0, ForceMode.VelocityChange);
            }
        }
        if (rb.position.y < -1f)
        {
            FindObjectOfType<GameManager>().EndGame();
        }

    }


    public void Right()
    {
        rb.AddForce(sidewaysforce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
    }
    public void Left()
    {
        rb.AddForce(-sidewaysforce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
    }
}

Please help me and thanks in advance to whoever helps

Hi, create a new script and name it TouchControl and copy-paste this:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;

public class TouchControl : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IPointerExitHandler
{
    public bool Pressed = false;

    public UnityEvent onPressed;

    public void OnPointerDown(PointerEventData eventData)
    {
        Pressed = true;
    }

    public void OnPointerUp(PointerEventData eventData)
    {
        Pressed = false;
    }

    public void OnPointerEnter(PointerEventData eventData)
    {
        Pressed = true;
    }

    public void OnPointerExit(PointerEventData eventData)
    {
        Pressed = false;
    }

    public void Update()
    {
        if (Pressed)
        {
            onPressed.Invoke();
        }
    }
}

Now add this script to both your buttons and in the inspector there will appear a “On Pressed ()” function with written “List is Empty”. Click the + button and there will appear a “None (Object)” field. Drag and drop your player from your Hierarchy and then click on the “No Function” bar, choose Player Movement and then choose your Right () / Left () function.

Ask if you don’t understand or you need something else.