0 votes
in 中文区(Chinese) by (180 points)
recategorized by

如何通过C#获取G2 4K序列号

1 Answer

0 votes
by (55.5k points)

您好,如果您使用Unity XR Platform SDK的话,您可以使用StateGetDeviceInfo接口,详情链接如下:
https://sdk.picovr.com/docs/XRPlatformSDK/Unity/cn/chapter_seven.html#stategetdeviceinfo

注意: 使用该接口前,请进行System Service初始化,具体方法参考如下链接:
https://sdk.picovr.com/docs/XRPlatformSDK/Unity/cn/chapter_seven.html#id7

by (180 points)

可以说下具体实现嘛

by (180 points)

而且我用的是PicoVRUnitySdk

by (55.5k points)

您好,
使用PicoVR Unity SDK(Deprecated)可以调用以下接口:
http://sdk.picovr.com/docs/UnitySDK/cn/chapter_seven.html#upvr-getdevicesn

调用方式如下: PvrUnitySDKAPI. System. UPvrGetDeviceSN()

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SNTest : MonoBehaviour
{
    private string sn;
    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        sn = Pvr_UnitySDKAPI.System.UPvr_GetDeviceSN();
        Debug.Log("sn:" + sn);
    }
}
...