File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Assets/HTC.UnityPlugin/VRModule Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ protected enum DefaultModuleOrder
3636
3737 private static readonly Regex s_viveRgx = new Regex ( "^.*(vive|htc).*$" , REGEX_OPTIONS ) ;
3838 private static readonly Regex s_viveCosmosRgx = new Regex ( "^.*(cosmos).*$" , REGEX_OPTIONS ) ;
39+ private static readonly Regex s_focus3Rgx = new Regex ( "focus3" , REGEX_OPTIONS ) ;
3940 private static readonly Regex s_ver3Rgx = new Regex ( "^.*3.0.*$" , REGEX_OPTIONS ) ;
4041 private static readonly Regex s_oculusRgx = new Regex ( "^.*(oculus|quest).*$" , REGEX_OPTIONS ) ;
4142 private static readonly Regex s_indexRgx = new Regex ( "^.*(index|knuckles).*$" , REGEX_OPTIONS ) ;
@@ -187,6 +188,18 @@ protected static void SetupKnownDeviceModel(IVRModuleDeviceStateRW deviceState)
187188 }
188189 deviceState . input2DType = VRModuleInput2DType . JoystickOnly ;
189190 }
191+ else if ( s_focus3Rgx . IsMatch ( deviceState . modelNumber ) )
192+ {
193+ if ( s_leftRgx . IsMatch ( deviceState . modelNumber ) )
194+ {
195+ deviceState . deviceModel = VRModuleDeviceModel . ViveFocus3ControllerLeft ;
196+ }
197+ else if ( s_rightRgx . IsMatch ( deviceState . modelNumber ) )
198+ {
199+ deviceState . deviceModel = VRModuleDeviceModel . ViveFocus3ControllerRight ;
200+ }
201+ deviceState . input2DType = VRModuleInput2DType . JoystickOnly ;
202+ }
190203 else
191204 {
192205 deviceState . deviceModel = VRModuleDeviceModel . ViveController ;
You can’t perform that action at this time.
0 commit comments