Open wirelessdreamer opened 3 years ago
@wirelessdreamer Currently, I do not have Index device to debug. Could you help to print out the log in this script (Assets\HTC.UnityPlugin\VRModule\Modules\SteamVRv2Module.cs)? Line 559, Help to print out deviceClass, serialNumber, modelNumber and renderModelName, thanks!
That Ifdef isn't active, so I'd never hit the related section of code
Which SDK did you import for your project? Please list the versions of your Unity Editor, SDKs... etc Thanks!
Unity 2019.4.8.f1 VIU 1.12 Oculus Integration 20.1
@wirelessdreamer I found the root cause is that XRDevice.model will return "Index". With combination of Index HMD + VIVE controller, XRDevice.model will not return "VIVE" for controller. We are still working on how to resolve this issue.
@wirelessdreamer Here is the solution, In Assets\HTC.UnityPlugin\VRModule\Modules\UnityEngineVRModule_2017_1.cs, Line 252, if (!XRDevice.model.Equals("None")) { currState.serialNumber = XRDevice.model + " " + m_nodeStateList[i].uniqueID.ToString("X8"); var model = Input.GetJoystickNames()[0]; if (string.IsNullOrEmpty(model)) { currState.modelNumber = XRDevice.model + " " + m_nodeStateList[i].nodeType; currState.renderModelName = XRDevice.model + " " + m_nodeStateList[i].nodeType; } else { currState.modelNumber = model; currState.renderModelName = model; } }
// The controller we want to look up the type on uint deviceIndex = GetComponentInParent().viveRole.GetDeviceIndex();
Debug.Log("Check controller type: " + VRModule.GetDeviceState(deviceIndex).deviceModel + " ID: " + deviceIndex);
Output: Check controller type: IndexControllerRight ID: 1