Problem with CrossPlaformInputManager.GetButton ()

Basically want an object to jump when I hit d space bar or a UIbutton (Wen Mobile Input is enabled). So i used if(CrossPlaformInputManager. GetButton (“Jump”)) {n the function to be performed}.

And i added ButtonHandler script to d UIButton and named it Jump.

But wt happens is wen i hit d space bar ’ Jump(); "is performed i. e. D object jumps (so there is probably no issue with d Jump(); method) BUT wen i Click on d UIBUTTON ( after enabling Mobile Input)… Nothing Happens.
Only the Button gets highlighted, that’ s it.

Here is my script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityStandardAssets.CrossPlatformInput;
public class Movement2 : MonoBehaviour
{
    public static Movement2 singleton;
    public float movespeed;
    CharacterController charactercont;
    public float gravity;
    RaycastHit hit;
    internal float Horizontal;
    public float JumpSpeed;
    internal float Fallspeed;
    public float rotspeed;

    void Awake()
    {
        if (singleton != null)
        {
            Destroy(gameObject);
        }
        else
        {
            singleton = this;
        }
    }
    // Use this for initialization
    void Start()
    {
        charactercont = GetComponent<CharacterController>();

    }

    // Update is called once per frame
    void Update()
    {


        Fall();
        Movex();
        Jump();
        Respawn();
    }

    public void Jump()
    {

        if (charactercont.isGrounded == true && CrossPlatformInputManager.GetButton("Jump"))
        {
            Fallspeed = -JumpSpeed;
            charactercont.Move(new Vector3(0, -Fallspeed, 0));
        }

    }
    void Fall()
    {
        if (charactercont.isGrounded == false)
        {
            Fallspeed += gravity * Time.deltaTime;
        }
        else
        {
            Fallspeed = 0;
        }
    }
    void Movex()
    {

        charactercont.Move(new Vector3(CrossPlatformInputManager.GetAxis("Horizontal") * movespeed * Time.deltaTime, -Fallspeed, 0));

        transform.Rotate(new Vector3(0, 0, -rotspeed * Time.deltaTime * CrossPlatformInputManager.GetAxis("Horizontal")));


    }
    void Respawn()
    {
        if (transform.position.y <= -40)
        {
            transform.position = checkpoint.point;
        }
    }
  
}

I added EventTrigger’ s PointDownEvent and set the SetUp and SetDown both states to the button.And now it works exactly how i wanted.96430-bandicam-2017-06-22-13-31-46-229.jpg