Pointer triggered UI button not working

Give us as much detail as possible regarding the issue you're experiencing:

Unity Editor version: 2022.2.12f1
ML2 OS version: 1.12.1
Unity SDK version: 2.2.0
Host OS: Windows 11

I am new to Magic Leap, so I'm struggling to do some basic things. Right now, I am trying to make a UI button that can be triggered by the controller pointer. I have tried to follow the Magic Leap Unity Examples project and have used the same UI button scripts from there. However, the pointer events are not detected. I'm wondering if this is an issue with how I set up the button or if it is because I haven't set up the controller pointer properly. Whenever I build to the headset, the ray from the controller displays as red, which I'm not sure is the expected behavior.

I've included screenshots of my button setup and Controller:



@kritig Welcome to the Developer Forum. I recommend using XRI's input and event's directly.

https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.2/manual/ui-setup.html

You can also use a standard 3D Canvas with the UI Button component. (GameObject > XR > UI Canvas) . Then use the standard UI components from Unity.

These instructions might help you get started.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.