In the Project panel, navigate to the Packages > Meta XR Interaction SDK Essentials > Runtime > Sample > Objects > UISet > Prefabs > Backplate folder and add a backplate for the UI by dragging the EmptyUIBackplateWithCanvas prefab to the Hierarchy panel.
The backplate prefab contains a Canvas, a background for the UI, some basic layout components, and ray and poke interactable components to enable direct touch and raycast interactions with the UI.
In the Hierarchy, select the CanvasRoot. In the Inspector, under Rect Transform, use the Width and Height properties to set the size of the Canvas. This example uses the following settings to scale it to a reasonable size for a few components:
- Rect Transform > Width: 500
- Rect Transform > Height: 250
In the Hierarchy, select the UIBackplate. In the Inspector, under Rect Transform, set the Width and Height properties to match the Canvas width and height set in the previous step. This example uses the following settings to match the Canvas size:
- Rect Transform > Width: 500
- Rect Transform > Height: 250
Add some UI elements to the panel to interact with by dragging and dropping prefabs from the Packages > Meta XR Interaction SDK Essentials > Runtime > Sample > Objects > UISet > Prefabs folder. For example, in the Buttons > UnityUIButtonBased folder, drag the PrimaryButton_IconAndLabel_UnityUIButton prefab to the UIBackplate object in the Hierarchy. The button element appears on the UI. Add as many elements as you desire to create your UI.
Build your project into an .apk to test your project.