Hello, metadata picking in VR can be done by modifying the VR01_CesiumDenver scene in CesiumUnitySamples.
In the scene, under XR Origin → Camera Offset → Right Hand Controller, enable the XR Interactor Line Visual component. This allows you to see the ray you are pointing.
Next create a game object and add the Cesium Metadata Picking script to it.
Modify the script to get a reference to the right hand controller game object, and the XR Ray Interactor component and also the input action property, i.e:
{
// The GameObject with the UI to enable / disable depending on
// whether metadata has been picked.
public GameObject metadataPanel;
// The text to display the metadata properties.
public Text metadataText;
public GameObject righthand;
XRRayInteractor xrayInteractor;
public InputActionProperty m_SelectAction;
Then in the editor, plug in the values:

For the Input Action Property, I chose XRI RightHandInteraction/Select, which maps to the side button (grip) on the right controller.
In the start method, you want to get a reference to the xray interactor, and also enable the InputActionProperty:
xrayInteractor = righthand.GetComponent<XRRayInteractor>();
m_SelectAction.action.Enable();
Next, we want to raycast whenever we hit the grip button, so in update, we modify it like so:
void Update()
{
bool getMetadata = m_SelectAction.action.triggered;
if (getMetadata && metadataText != null)
{
metadataText.text = "";
RaycastHit hit;
if (
xrayInteractor.TryGetCurrent3DRaycastHit(
out hit))
{
I think everything should work… The only thing left is that the UI is not designed for VR… In order to show it, you can go to the CesiumMetadataUI gameobject, and change the Canvas Render mode to World Space, and move the Panel somewhere you can see.