Event trigger not calling function C#

Hi Guys,

I’m trying to make a simple app specifically for the iPhone. Yes I know there is one in the asset store but I want my own version. So I have a cube rotating and I would like the cube to rotate the other way whenever I tap on the cube. I have an Event Trigger attached to the cube and a script controlling it. The cube is rotating properly. I’m testing it using Unity 2017 at the moment. For some reasons it’s not reacting to my clicks and it’s not even calling the function in the script. I dunno why. Someone who had this problem or knows how to solve this? What am I missing?

Script`float x,y,z;
Vector3 rotationDirection, upRotation, downRotation;
GameObject cam;
CameraController camScript;

void Awake()
{
    x = 75; y = 60; z = 45;
    upRotation = new Vector3(X, Y, Z);
    rotationDirection = upRotation;
    cam = GameObject.Find("Main Camera");
    camScript = cam.GetComponent<CameraController>();
}

public void ChangeDirection()
    {
    Debug.Log("Did not reach here..");
    if (rotationDirection == upRotation)
    {
        x = -X; y = -Y; z = -Z;
        downRotation = new Vector3(X, Y, Z);
        rotationDirection = downRotation;
        camScript.SetDirection(Vector3.left);
    }
    else
    {
        x = Mathf.Abs(X); y = Mathf.Abs(Y); z = Mathf.Abs(Z);
        upRotation = new Vector3(X, Y, Z);
        rotationDirection = upRotation;
        camScript.SetDirection(Vector3.right);
    }
    }

// Update is called once per frame
void Update () {
    transform.Rotate(rotationDirection * Time.deltaTime);
}`

Thanks in advance!

You have to specify a function to run otherwise it won’t do anything