How to make console controller UI?

So I made custom cursor and made it moving by console controller’s left stick.

Then, how to recognize current cursor’s position to detect positioned on some UI? how to pop-up window for description?

I connected console controller to PC by bluetooth and unity engine recognize it, and I know when pad’s A button pressed.

Then, how to make UI button being clicked when custom cursor is positioned on it and user pressed pad’s A button?

You can change the cursor in unity without programming one yourself Edit → Project Settings → Player → Default Cursor.

Also to check if your cursor is over a button/image/panel/whatever you can use an Event Trigger and attach the PointerEnter and PointerExit events. These pretty much work like buttons, drag your object/script you want to use when triggered in the slot, select the function to run when triggered.

Thanks, so I changed default cursor.
Then mouse’s cursor changed when over to game screen.

  1. But then, how to make this move via controller’s left stick instead of mouse’s movement.

  2. And how to make controller’s A button work as mouse left click selection?
    I tested with this code, but not works.

void Start()
{
SwitchKeyMap.Instance.SwitchKeyEvent += SwitchKeySub;
}

public void AButtonSelect()
    {
        Input.GetMouseButtonDown(0);
    }
public void SwitchKeySub(NpadButton key)
    {
        if (key == NpadButton.A)
            AButtonSelect();
    }