OnMouseDown for Xbox Controller

I have a Project where you can go around and cycle through different arrays of objects OnMouseDown. I wanted to be able to use a Xbox one controller with this but it doesn’t recognize it. There are other objects in the scene that have a OnMouseOver function that seem to be working fine.
I’ve changed my script to:

void Update()
if (Input.GetButtonDown(“Fire1”))

However now, no matter where i click it will activate everything that had a OnMouseDown function.

Any Help greatly appreciated.

Hi @zuzia1992
What about this :
//set a boolean to be an on off

public bool myBool;

void Update () {

    if(Input.GetButtonDown("Fire1")) {
        if (myBool == true) { myBool = false; }
        else if (myBool == false) { myBool = true; }

    if (myBool)
    else { DoThat; }

hope it helps