File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
Packages/webxr-interactions
Samples~/XRInteractionToolkit/Scenes Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
9
9
### Added
10
10
- An option to set depthStencilFormat in MixedRealityCaptureController.
11
+ - InputActionProperty click to SceneHitTest. Now project is not forced to use old Input Manager.
11
12
12
13
### Changed
13
14
- XR Interaction Toolkit sample XR Rig now use 1 camera instead of cameras group.
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ public class SceneHitTest : MonoBehaviour
22
22
private InputActionProperty leftTrigger ;
23
23
[ SerializeField ]
24
24
private InputActionProperty rightTrigger ;
25
+ [ SerializeField ]
26
+ private InputActionProperty click ;
25
27
#endif
26
28
27
29
private bool isFollowing = false ;
@@ -94,7 +96,14 @@ bool GetControllersButtonDown()
94
96
95
97
void Update ( )
96
98
{
97
- if ( isFollowing && ( Input . GetMouseButtonDown ( 0 ) || GetControllersButtonDown ( ) ) )
99
+ if ( isFollowing && (
100
+ #if UNITY_INPUT_SYSTEM_1_4_4_OR_NEWER
101
+ ( useInputSystem && click . action ? . IsPressed ( ) == true ) ||
102
+ #endif
103
+ #if ENABLE_LEGACY_INPUT_MANAGER
104
+ Input . GetMouseButtonDown ( 0 ) ||
105
+ #endif
106
+ GetControllersButtonDown ( ) ) )
98
107
{
99
108
isFollowing = false ;
100
109
visual. SetActive ( false ) ;
Original file line number Diff line number Diff line change @@ -8157,6 +8157,19 @@ MonoBehaviour:
8157
8157
m_Flags : 0
8158
8158
m_Reference : {fileID: 3279264004350380116, guid: c348712bda248c246b8c49b3db54643f,
8159
8159
type : 3}
8160
+ click :
8161
+ m_UseReference : 1
8162
+ m_Action :
8163
+ m_Name : Click
8164
+ m_Type : 0
8165
+ m_ExpectedControlType :
8166
+ m_Id : 927472d9-94ca-4011-ab4f-9cd8ffae70e8
8167
+ m_Processors :
8168
+ m_Interactions :
8169
+ m_SingletonActionBindings : []
8170
+ m_Flags : 0
8171
+ m_Reference : {fileID: 1855836014308820768, guid: c348712bda248c246b8c49b3db54643f,
8172
+ type : 3}
8160
8173
--- !u!4 &1241030032
8161
8174
Transform :
8162
8175
m_ObjectHideFlags : 0
You can’t perform that action at this time.
0 commit comments