Need help in porting jump controls to android!

Hello guys,

so i have been trying to change my controls such that when a person touches the screen, the player is to jump. i have referred to many sites and many links but im still unable to change it.
any help would be appreciated!

The following code below is what is supposed to be changed, for now the jump works perfectly on PC.

using UnityEngine;
using UnitySampleAssets.CrossPlatformInput;

namespace UnitySampleAssets._2D
{

    [RequireComponent(typeof (PlatformerCharacter2D))]
    public class Platformer2DUserControl : MonoBehaviour
    {
        private PlatformerCharacter2D character;
        private bool jump;
	
        private void Awake()
        {

            character = GetComponent<PlatformerCharacter2D>();

        }

        private void Update()
        {
           if (!jump) {
			
				jump = CrossPlatformInputManager.GetButtonDown ("Jump");

			} 

		
		character.Move(1, false, jump);
		jump = false;


	}      
	
}
}

Im not sure if I undrestood corectly but I think this should work :slight_smile:

    private void Update() {
    	if (!jump && (Input.touchCount > 0) {
    		//Jump or whatever
     	} 
     }