Need some help with Touchscreen Input.

I am new to Unity and I’m making a Infinite Runner that runs along the z axis. I have procedural generation, score system, and a working movement system that uses the Horizontal Axis to move left and right. Does anyone know how I could change the ‘a’ and ‘d’ inputs to touchscreen where by pressing the left side of the screen, the character would move left, and by pressing the right side, the character would move right? Thanks for helping, but I’m only interested in C# scripts

could you try detecting which side of the screen you push? Something like…

using UnityEngine;
using System.Collections;

public class Split : MonoBehaviour {


    float width;
	// Use this for initialization
	void Start ()
    {
        width = Screen.width / 2;
	}
	
	// Update is called once per frame
	void Update ()
    {
        if (Input.touches.Length > 0)
        {
            if (Input.touches[0].position.x > width)
            {
                Debug.Log("Right");
            }
            else
            {
                Debug.Log("Left");
            }
        }
	}
}