Skip to content

Commit cf78a59

Browse files
committed
Revert "Add new input action focus handling (#1028)"
This reverts commit f52cded.
1 parent 6eab22e commit cf78a59

2 files changed

Lines changed: 0 additions & 34 deletions

File tree

org.mixedrealitytoolkit.core/Subsystems/MRTKLifecycleManager.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Collections.Generic;
66
using Unity.Profiling;
77
using UnityEngine;
8-
using UnityEngine.InputSystem;
98

109
namespace MixedReality.Toolkit.Subsystems
1110
{
@@ -19,9 +18,6 @@ public class MRTKLifecycleManager :
1918
MonoBehaviour,
2019
IDisposable
2120
{
22-
[SerializeField, Tooltip("A set of input actions to enable/disable according to the app's focus state.")]
23-
private InputActionReference[] inputActionReferences;
24-
2521
private List<IMRTKManagedSubsystem> managedSubsystems = new List<IMRTKManagedSubsystem>();
2622

2723
/// <summary>
@@ -180,33 +176,6 @@ private void LateUpdate()
180176
}
181177
}
182178

183-
/// <summary>
184-
/// Sent to all GameObjects when the player gets or loses focus.
185-
/// </summary>
186-
/// <param name="focus"><see langword="true"/> if the GameObjects have focus, else <see langword="false"/>.</param>
187-
protected void OnApplicationFocus(bool focus)
188-
{
189-
// We want to ensure we're focused for input, as some runtimes continue reporting "tracked" while pose updates are paused.
190-
// This is allowed, per-spec, as a "should": "Runtimes should make input actions inactive while the application is unfocused,
191-
// and applications should react to an inactive input action by skipping rendering of that action's input avatar
192-
// (depictions of hands or other tracked objects controlled by the user)."
193-
194-
if (focus)
195-
{
196-
foreach (InputActionReference reference in inputActionReferences)
197-
{
198-
reference.action.Enable();
199-
}
200-
}
201-
else
202-
{
203-
foreach (InputActionReference reference in inputActionReferences)
204-
{
205-
reference.action.Disable();
206-
}
207-
}
208-
}
209-
210179
#endregion MonoBehaviour
211180

212181
/// <summary>

org.mixedrealitytoolkit.input/Assets/Prefabs/MRTK XR Rig.prefab

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,6 @@ MonoBehaviour:
378378
m_Script: {fileID: 11500000, guid: 1a107350295baaf4489642caa92f05de, type: 3}
379379
m_Name:
380380
m_EditorClassIdentifier:
381-
inputActionReferences:
382-
- {fileID: -7613329581162844239, guid: 18c412191cdc9274897f101c7fd5316f, type: 3}
383-
- {fileID: 3239510804178183174, guid: 18c412191cdc9274897f101c7fd5316f, type: 3}
384381
--- !u!1 &7735890427496681069
385382
GameObject:
386383
m_ObjectHideFlags: 0

0 commit comments

Comments
 (0)