Skip to content

Commit f2ed5c9

Browse files
reverted touch input removal
1 parent 87184b6 commit f2ed5c9

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

Assets/MixedRealityToolkit-SDK/Features/Input/MixedRealityInputManager.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ private void InitializeInternal()
194194

195195
speechEventData = new SpeechEventData(EventSystem.current);
196196
dictationEventData = new DictationEventData(EventSystem.current);
197+
198+
if (MixedRealityManager.Instance.ActiveProfile.InputSystemProfile.IsTouchScreenInputEnabled)
199+
{
200+
TouchscreenInputSource = new TouchscreenInputSource();
201+
}
197202
}
198203

199204
/// <inheritdoc />

Assets/MixedRealityToolkit-SDK/Profiles/DefaultMixedRealityInputSystemProfile.asset

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ MonoBehaviour:
1717
pointerProfile: {fileID: 11400000, guid: 48aa63a9725047b28d4137fd0834bc31, type: 2}
1818
speechCommandsProfile: {fileID: 11400000, guid: e8d0393e66374dae9646851a57dc6bc1,
1919
type: 2}
20+
enableTouchScreenInput: 1
21+
touchScreenInputProfile: {fileID: 11400000, guid: efe3718cb67cffa46a5f6361a522baba,
22+
type: 2}
2023
enableControllerMapping: 1
2124
controllerMappingProfile: {fileID: 11400000, guid: 39ded1fd0711a0c448413d0e1ec4f7f3,
2225
type: 2}

Assets/MixedRealityToolkit/_Core/Definitions/InputSystem/MixedRealityInputSystemProfile.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public MixedRealityPointerProfile PointerProfile
5353
get { return pointerProfile; }
5454
private set { pointerProfile = value; }
5555
}
56+
5657
private IMixedRealitySpeechSystem speechSystem;
5758

5859
/// <summary>
@@ -90,6 +91,32 @@ public MixedRealitySpeechCommandsProfile SpeechCommandsProfile
9091
/// </summary>
9192
public bool IsDictationEnabled => MixedRealityManager.Instance.ActiveProfile.IsInputSystemEnabled && DictationManager != null;
9293

94+
[SerializeField]
95+
[Tooltip("Enable Touch Screen Input for your application.")]
96+
private bool enableTouchScreenInput = false;
97+
98+
/// <summary>
99+
/// Enable Touch Screen Input for your application.
100+
/// </summary>
101+
public bool IsTouchScreenInputEnabled
102+
{
103+
get { return touchScreenInputProfile != null && enableTouchScreenInput && MixedRealityManager.Instance.ActiveProfile.IsInputSystemEnabled; }
104+
private set { enableTouchScreenInput = value; }
105+
}
106+
107+
[SerializeField]
108+
[Tooltip("Touch Screen Input Source profile for wiring up Actions.")]
109+
private MixedRealityTouchInputProfile touchScreenInputProfile;
110+
111+
/// <summary>
112+
/// Touch Screen Input Source profile for wiring up Actions.
113+
/// </summary>
114+
public MixedRealityTouchInputProfile TouchScreenInputProfile
115+
{
116+
get { return touchScreenInputProfile; }
117+
private set { touchScreenInputProfile = value; }
118+
}
119+
93120
[SerializeField]
94121
[Tooltip("Enable and configure the devices for your application.")]
95122
private bool enableControllerMapping = false;

Assets/MixedRealityToolkit/_Core/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class MixedRealityInputSystemProfileInspector : MixedRealityBaseConfigura
1515
private SerializedProperty gesturesProfile;
1616
private SerializedProperty pointerProfile;
1717
private SerializedProperty speechCommandsProfile;
18+
private SerializedProperty enableTouchScreenInput;
19+
private SerializedProperty touchScreenInputProfile;
1820
private SerializedProperty enableControllerMapping;
1921
private SerializedProperty controllerMappingProfile;
2022

@@ -34,6 +36,8 @@ private void OnEnable()
3436
gesturesProfile = serializedObject.FindProperty("gesturesProfile");
3537
pointerProfile = serializedObject.FindProperty("pointerProfile");
3638
speechCommandsProfile = serializedObject.FindProperty("speechCommandsProfile");
39+
enableTouchScreenInput = serializedObject.FindProperty("enableTouchScreenInput");
40+
touchScreenInputProfile = serializedObject.FindProperty("touchScreenInputProfile");
3741
enableControllerMapping = serializedObject.FindProperty("enableControllerMapping");
3842
controllerMappingProfile = serializedObject.FindProperty("controllerMappingProfile");
3943
}
@@ -67,6 +71,9 @@ public override void OnInspectorGUI()
6771
changed |= RenderProfile(pointerProfile);
6872
changed |= RenderProfile(speechCommandsProfile);
6973

74+
EditorGUILayout.PropertyField(enableTouchScreenInput);
75+
changed |= RenderProfile(touchScreenInputProfile);
76+
7077
EditorGUILayout.PropertyField(enableControllerMapping);
7178
changed |= RenderProfile(controllerMappingProfile);
7279

0 commit comments

Comments
 (0)