Esempio n. 1
0
        //device情報を取得する
        public bool GetPropertyInt32(uint idx, ETrackedDeviceProperty prop, out int result)
        {
            ETrackedPropertyError error = new ETrackedPropertyError();

            result = openvr.GetInt32TrackedDeviceProperty(idx, prop, ref error);
            return(error == ETrackedPropertyError.TrackedProp_Success);
        }
Esempio n. 2
0
    public static int GetInt32TrackedDeviceProperty(this CVRSystem system, uint unDeviceIndex, ETrackedDeviceProperty prop)
    {
        ETrackedPropertyError error = ETrackedPropertyError.TrackedProp_Success;
        int value = system.GetInt32TrackedDeviceProperty(unDeviceIndex, prop, ref error);

        if (error != ETrackedPropertyError.TrackedProp_Success)
        {
            throw OpenVRException.Make(error);
        }
        return(value);
    }