+1 vote
by (230 points)

Hi,

I used to get Headset name of Pico Neo 2 and 3 headset by using the InputDevices.GetDevice of Unity XR Toolkit.

I had no problem with version 1.2.4 of "Pico - Unity XR Platform SDK (Legacy)" but headset name is no longer available in version 2.0.2 of "Unity XR SDK". The other weird thing is that controller names are still available as show in theses logs that are showing the printing of all available VR Devices recognized by Unity XR Toolkit :
enter image description here

I really need the complete name of the headset as it used to contains the precision between Neo 2 and Neo 3 in the device name.

Thank you for your answer

2 Answers

+1 vote
by (55.5k points)
selected by
 
Best answer

Dear developer,

We recommend using the API in our Unity XR SDK v_2.0.2:
https://sdk.picovr.com/docs/UnityXRSDK/en/chapter_seven.html#stategetdeviceinfo
Note:it supports Neo 3 Pro series equipments and you need to initialize and bind service.

However,according to your specific question, you can try with the following code to get the device name in Unity XR SDK v_2.0.2:

Debug.Log("System Name" + SystemInfo.deviceName);

Hope this information helps you.

by (230 points)

It's working like a charm thank you !

+1 vote
by (210 points)

This is my code for getting device name / model:


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.XR.PXR;

public class DeviceInfo : MonoBehaviour
{
    [Header("References")]
    [SerializeField] PXR_Manager xrRig;
    [SerializeField] TMPro.TextMeshProUGUI lbl_device;

    [Header("Runtime")]
    [SerializeField] string device;

    private void Awake()
    {
        PXR_System.InitSystemService(xrRig.name);
        PXR_System.BindSystemService();
    }

    private void Start()
    {
        device = "unknown device";
        device = PXR_System.StateGetDeviceInfo(SystemInfoEnum.EQUIPMENT_MODEL);
        Debug.Log($"{name}: Detected device: {device}");
    }
}

by (230 points)

Thanks for your answer, but i was looking for something that isn't necessary binded to Pico SDK as I'm developping an application that is going to run on both Pico and Oculus Quest. That's why I used XR Toolkit way to be able to get device name.

I'll give a try to your solution if nothing else can be done, but i'm pretty sure there's another way as the controllers are named correctyl.

Here's how i'm currently doing (this version of code worked on 1.24 version of Pico SDK) :

enter image description here

by (210 points)

ah I see. didn´t realize you´d need to distinguish between quest and pico. I do not have an answer to that then I´m afraid :<

...