Print the serial number of all connected devices¶
Shows how to print out the internal serial numbers of all connected vr devices (controllers and trackers).
vr/printAllDeviceSerialNumbers.py¶
1# © 2024 Autodesk, Inc. All rights reserved.
2
3# Get all currently connected VR devices
4devices = vrDeviceService.getConnectedVRDevices()
5
6# Print name and serial number for all devices
7# Note: If a VR device is created in a script before it is connected,
8# name or serial number may be empty
9for device in devices:
10 print((device.getName()))
11 print((device.getSerialNumber()))