Skip to content

Commit f48d6ef

Browse files
committed
Refactor various InputSystem members to improved separation of concerns (ISX-1842)
- Make InputSystem static fields private with read-only accessors - Add InputSystemTestHooks.cs for "Test Hook" operations that need direct access to fields - Factor out InputSystemObject (and related State) and rename to InputSystemStateManager - Factor out "dirty asset tracking" functionality to a separate Utility class Despite touching a bunch of files, this is a low-risk set of changes; functions are moved to new files and types renamed, but no real changes to functionality. Validated changes with Edit/Play/Player tests.
1 parent cdaa10b commit f48d6ef

37 files changed

+357
-307
lines changed

Assets/Tests/InputSystem/CoreTests_Actions.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6080,12 +6080,12 @@ public void Actions_AddingSameProcessorTwice_DoesntImpactUIHideState()
60806080
InputSystem.RegisterProcessor<ConstantFloat1TestProcessor>();
60816081
Assert.That(InputSystem.TryGetProcessor("ConstantFloat1Test"), Is.Not.EqualTo(null));
60826082

6083-
bool hide = InputSystem.s_Manager.processors.ShouldHideInUI("ConstantFloat1Test");
6083+
bool hide = InputSystem.manager.processors.ShouldHideInUI("ConstantFloat1Test");
60846084
Assert.That(hide, Is.EqualTo(false));
60856085

60866086
InputSystem.RegisterProcessor<ConstantFloat1TestProcessor>();
60876087
// Check we haven't caused this to alias with itself and cause it to be hidden in the UI
6088-
hide = InputSystem.s_Manager.processors.ShouldHideInUI("ConstantFloat1Test");
6088+
hide = InputSystem.manager.processors.ShouldHideInUI("ConstantFloat1Test");
60896089
Assert.That(hide, Is.EqualTo(false));
60906090
}
60916091

@@ -6731,7 +6731,7 @@ public void Actions_RegisteringExistingInteractionUnderNewName_CreatesAlias()
67316731
{
67326732
InputSystem.RegisterInteraction<HoldInteraction>("TestTest");
67336733

6734-
Assert.That(InputSystem.s_Manager.interactions.aliases.Contains(new InternedString("TestTest")));
6734+
Assert.That(InputSystem.manager.interactions.aliases.Contains(new InternedString("TestTest")));
67356735
}
67366736

67376737
#endif // UNITY_EDITOR
@@ -9023,7 +9023,7 @@ public void Actions_RegisteringExistingCompositeUnderNewName_CreatesAlias()
90239023
{
90249024
InputSystem.RegisterBindingComposite<Vector2Composite>("TestTest");
90259025

9026-
Assert.That(InputSystem.s_Manager.composites.aliases.Contains(new InternedString("TestTest")));
9026+
Assert.That(InputSystem.manager.composites.aliases.Contains(new InternedString("TestTest")));
90279027
}
90289028

90299029
#endif // UNITY_EDITOR
@@ -11103,7 +11103,7 @@ public void Actions_DisablingAllActions_RemovesAllTheirStateMonitors()
1110311103

1110411104
// Not the most elegant test as we reach into internals here but with the
1110511105
// current API, it's not possible to enumerate monitors from outside.
11106-
Assert.That(InputSystem.s_Manager.m_StateChangeMonitors,
11106+
Assert.That(InputSystem.manager.m_StateChangeMonitors,
1110711107
Has.All.Matches(
1110811108
(InputManager.StateChangeMonitorsForDevice x) => x.memoryRegions.All(r => r.sizeInBits == 0)));
1110911109
}
@@ -12123,7 +12123,7 @@ public void Actions_CompositeBindingResetWhenResetDeviceCalledWhileExecutingActi
1212312123
// Disable the Keyboard while action is being performed.
1212412124
// This simulates an "OnFocusLost" event occurring while processing the Action, e.g. when switching primary displays or moving the main window
1212512125
actionPerformed = true;
12126-
InputSystem.s_Manager.EnableOrDisableDevice(keyboard.device, false, InputManager.DeviceDisableScope.TemporaryWhilePlayerIsInBackground);
12126+
InputSystem.manager.EnableOrDisableDevice(keyboard.device, false, InputManager.DeviceDisableScope.TemporaryWhilePlayerIsInBackground);
1212712127
};
1212812128

1212912129
map.Enable();
@@ -12136,7 +12136,7 @@ public void Actions_CompositeBindingResetWhenResetDeviceCalledWhileExecutingActi
1213612136
Assert.IsTrue(actionPerformed);
1213712137

1213812138
// Re enable the Keyboard (before keys are released) and execute Action again
12139-
InputSystem.s_Manager.EnableOrDisableDevice(keyboard.device, true, InputManager.DeviceDisableScope.TemporaryWhilePlayerIsInBackground);
12139+
InputSystem.manager.EnableOrDisableDevice(keyboard.device, true, InputManager.DeviceDisableScope.TemporaryWhilePlayerIsInBackground);
1214012140

1214112141
actionPerformed = false;
1214212142
Release(keyboard.leftShiftKey);
@@ -12155,7 +12155,7 @@ public void Actions_CompositeBindingResetWhenResetDeviceCalledWhileExecutingActi
1215512155
Release(keyboard.f1Key);
1215612156

1215712157
// Re enable the Keyboard (after keys are released) and execute Action one more time
12158-
InputSystem.s_Manager.EnableOrDisableDevice(keyboard.device, true, InputManager.DeviceDisableScope.TemporaryWhilePlayerIsInBackground);
12158+
InputSystem.manager.EnableOrDisableDevice(keyboard.device, true, InputManager.DeviceDisableScope.TemporaryWhilePlayerIsInBackground);
1215912159

1216012160
Press(keyboard.leftCtrlKey);
1216112161
Press(keyboard.leftShiftKey);
@@ -12169,7 +12169,7 @@ public void Actions_CompositeBindingResetWhenResetDeviceCalledWhileExecutingActi
1216912169
Press(keyboard.f1Key);
1217012170

1217112171
// Re enable the Keyboard (before keys are released) and verify Action isn't triggered when Key pressed first
12172-
InputSystem.s_Manager.EnableOrDisableDevice(keyboard.device, true, InputManager.DeviceDisableScope.TemporaryWhilePlayerIsInBackground);
12172+
InputSystem.manager.EnableOrDisableDevice(keyboard.device, true, InputManager.DeviceDisableScope.TemporaryWhilePlayerIsInBackground);
1217312173

1217412174
Press(keyboard.f1Key);
1217512175
Press(keyboard.leftCtrlKey);

Assets/Tests/InputSystem/CoreTests_Devices.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,11 @@ public void Devices_AddingDeviceThatUsesBeforeRenderUpdates_CausesBeforeRenderUp
572572

573573
InputSystem.RegisterLayout(deviceJson);
574574

575-
Assert.That(InputSystem.s_Manager.updateMask & InputUpdateType.BeforeRender, Is.EqualTo((InputUpdateType)0));
575+
Assert.That(InputSystem.manager.updateMask & InputUpdateType.BeforeRender, Is.EqualTo((InputUpdateType)0));
576576

577577
InputSystem.AddDevice("CustomGamepad");
578578

579-
Assert.That(InputSystem.s_Manager.updateMask & InputUpdateType.BeforeRender, Is.EqualTo(InputUpdateType.BeforeRender));
579+
Assert.That(InputSystem.manager.updateMask & InputUpdateType.BeforeRender, Is.EqualTo(InputUpdateType.BeforeRender));
580580
}
581581

582582
[Test]
@@ -596,15 +596,15 @@ public void Devices_RemovingLastDeviceThatUsesBeforeRenderUpdates_CausesBeforeRe
596596
var device1 = InputSystem.AddDevice("CustomGamepad");
597597
var device2 = InputSystem.AddDevice("CustomGamepad");
598598

599-
Assert.That(InputSystem.s_Manager.updateMask & InputUpdateType.BeforeRender, Is.EqualTo(InputUpdateType.BeforeRender));
599+
Assert.That(InputSystem.manager.updateMask & InputUpdateType.BeforeRender, Is.EqualTo(InputUpdateType.BeforeRender));
600600

601601
InputSystem.RemoveDevice(device1);
602602

603-
Assert.That(InputSystem.s_Manager.updateMask & InputUpdateType.BeforeRender, Is.EqualTo(InputUpdateType.BeforeRender));
603+
Assert.That(InputSystem.manager.updateMask & InputUpdateType.BeforeRender, Is.EqualTo(InputUpdateType.BeforeRender));
604604

605605
InputSystem.RemoveDevice(device2);
606606

607-
Assert.That(InputSystem.s_Manager.updateMask & InputUpdateType.BeforeRender, Is.EqualTo((InputUpdateType)0));
607+
Assert.That(InputSystem.manager.updateMask & InputUpdateType.BeforeRender, Is.EqualTo((InputUpdateType)0));
608608
}
609609

610610
private class TestDeviceReceivingAddAndRemoveNotification : Mouse

Assets/Tests/InputSystem/CoreTests_Editor.cs

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,6 @@ public static Version ReadVersion()
7171
}
7272
}
7373

74-
private void SimulateDomainReload()
75-
{
76-
// This quite invasively goes into InputSystem internals. Unfortunately, we
77-
// have no proper way of simulating domain reloads ATM. So we directly call various
78-
// internal methods here in a sequence similar to what we'd get during a domain reload.
79-
// Since we're faking it, pass 'true' for calledFromCtor param.
80-
81-
InputSystem.s_SystemObject.OnBeforeSerialize();
82-
InputSystem.s_SystemObject = null;
83-
InputSystem.s_Manager = null; // Do NOT Dispose()! The native memory cannot be freed as it's reference by saved state
84-
InputSystem.InitializeInEditor(true, runtime);
85-
}
86-
8774
[Test]
8875
[Category("Editor")]
8976
public void Editor_PackageVersionAndAssemblyVersionAreTheSame()
@@ -213,7 +200,7 @@ public void Editor_DomainReload_CanRestoreDevicesBuiltWithDynamicallyGeneratedLa
213200
Assert.That(InputSystem.devices, Is.Empty);
214201

215202
var state = m_StateManager.GetSavedState();
216-
var manager = InputSystem.s_Manager;
203+
var manager = InputSystem.manager;
217204

218205
manager.m_SavedAvailableDevices = state.managerState.availableDevices;
219206
manager.m_SavedDeviceStates = state.managerState.devices;
@@ -232,7 +219,7 @@ public void Editor_DomainReload_PreservesUsagesOnDevices()
232219
var device = InputSystem.AddDevice<Gamepad>();
233220
InputSystem.SetDeviceUsage(device, CommonUsages.LeftHand);
234221

235-
SimulateDomainReload();
222+
InputSystem.TestHook_SimulateDomainReload(runtime);
236223

237224
var newDevice = InputSystem.devices[0];
238225

@@ -252,7 +239,7 @@ public void Editor_DomainReload_PreservesEnabledState()
252239

253240
Assert.That(device.enabled, Is.False);
254241

255-
SimulateDomainReload();
242+
InputSystem.TestHook_SimulateDomainReload(runtime);
256243

257244
var newDevice = InputSystem.devices[0];
258245

@@ -265,7 +252,7 @@ public void Editor_DomainReload_InputSystemInitializationCausesDevicesToBeRecrea
265252
{
266253
InputSystem.AddDevice<Gamepad>();
267254

268-
SimulateDomainReload();
255+
InputSystem.TestHook_SimulateDomainReload(runtime);
269256

270257
Assert.That(InputSystem.devices, Has.Count.EqualTo(1));
271258
Assert.That(InputSystem.devices[0], Is.TypeOf<Gamepad>());
@@ -302,7 +289,7 @@ public void Editor_DomainReload_CustomDevicesAreRestoredAsLayoutsBecomeAvailable
302289
InputSystem.RegisterLayout(kLayout);
303290
InputSystem.AddDevice("CustomDevice");
304291

305-
SimulateDomainReload();
292+
InputSystem.TestHook_SimulateDomainReload(runtime);
306293

307294
Assert.That(InputSystem.devices, Is.Empty);
308295

@@ -323,7 +310,7 @@ public void Editor_DomainReload_RetainsUnsupportedDevices()
323310
});
324311
InputSystem.Update();
325312

326-
SimulateDomainReload();
313+
InputSystem.TestHook_SimulateDomainReload(runtime);
327314

328315
Assert.That(InputSystem.GetUnsupportedDevices(), Has.Count.EqualTo(1));
329316
Assert.That(InputSystem.GetUnsupportedDevices()[0].interfaceName, Is.EqualTo("SomethingUnknown"));
@@ -2517,7 +2504,7 @@ public void TODO_Editor_SettingsModifiedInPlayMode_AreRestoredWhenReEnteringEdit
25172504
[Category("Editor")]
25182505
public void Editor_AlwaysKeepsEditorUpdatesEnabled()
25192506
{
2520-
Assert.That(InputSystem.s_Manager.updateMask & InputUpdateType.Editor, Is.EqualTo(InputUpdateType.Editor));
2507+
Assert.That(InputSystem.manager.updateMask & InputUpdateType.Editor, Is.EqualTo(InputUpdateType.Editor));
25212508
}
25222509

25232510
[Test]
@@ -2939,15 +2926,15 @@ public void Editor_LeavingPlayMode_DestroysAllActionStates()
29392926
action.Enable();
29402927

29412928
Assert.That(InputActionState.s_GlobalState.globalList.length, Is.EqualTo(1));
2942-
Assert.That(InputSystem.s_Manager.m_StateChangeMonitors.Length, Is.GreaterThan(0));
2943-
Assert.That(InputSystem.s_Manager.m_StateChangeMonitors[0].count, Is.EqualTo(1));
2929+
Assert.That(InputSystem.manager.m_StateChangeMonitors.Length, Is.GreaterThan(0));
2930+
Assert.That(InputSystem.manager.m_StateChangeMonitors[0].count, Is.EqualTo(1));
29442931

29452932
// Exit play mode.
29462933
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);
29472934
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredEditMode);
29482935

29492936
Assert.That(InputActionState.s_GlobalState.globalList.length, Is.Zero);
2950-
Assert.That(InputSystem.s_Manager.m_StateChangeMonitors[0].listeners[0].control, Is.Null); // Won't get removed, just cleared.
2937+
Assert.That(InputSystem.manager.m_StateChangeMonitors[0].listeners[0].control, Is.Null); // Won't get removed, just cleared.
29512938
}
29522939

29532940
[Test]

Assets/Tests/InputSystem/CoreTests_Events.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ public void Events_CanSwitchToFullyManualUpdates()
431431

432432
#if UNITY_EDITOR
433433
// Edit mode updates shouldn't have been disabled in editor.
434-
Assert.That(InputSystem.s_Manager.updateMask & InputUpdateType.Editor, Is.Not.Zero);
434+
Assert.That(InputSystem.manager.updateMask & InputUpdateType.Editor, Is.Not.Zero);
435435
#endif
436436

437437
InputSystem.QueueStateEvent(mouse, new MouseState().WithButton(MouseButton.Left));
@@ -458,8 +458,8 @@ public void Events_CanSwitchToProcessingInFixedUpdates()
458458

459459
Assert.That(InputSystem.settings.updateMode, Is.EqualTo(InputSettings.UpdateMode.ProcessEventsInFixedUpdate));
460460
Assert.That(receivedOnChange, Is.True);
461-
Assert.That(InputSystem.s_Manager.updateMask & InputUpdateType.Fixed, Is.EqualTo(InputUpdateType.Fixed));
462-
Assert.That(InputSystem.s_Manager.updateMask & InputUpdateType.Dynamic, Is.EqualTo(InputUpdateType.None));
461+
Assert.That(InputSystem.manager.updateMask & InputUpdateType.Fixed, Is.EqualTo(InputUpdateType.Fixed));
462+
Assert.That(InputSystem.manager.updateMask & InputUpdateType.Dynamic, Is.EqualTo(InputUpdateType.None));
463463

464464
InputSystem.QueueStateEvent(mouse, new MouseState().WithButton(MouseButton.Left));
465465
runtime.currentTimeForFixedUpdate += Time.fixedDeltaTime;
@@ -475,19 +475,19 @@ public void Events_CanSwitchToProcessingInFixedUpdates()
475475
[Category("Events")]
476476
public void Events_ShouldRunUpdate_AppliesUpdateMask()
477477
{
478-
InputSystem.s_Manager.updateMask = InputUpdateType.Dynamic;
478+
InputSystem.manager.updateMask = InputUpdateType.Dynamic;
479479

480480
Assert.That(runtime.onShouldRunUpdate.Invoke(InputUpdateType.Dynamic));
481481
Assert.That(!runtime.onShouldRunUpdate.Invoke(InputUpdateType.Fixed));
482482
Assert.That(!runtime.onShouldRunUpdate.Invoke(InputUpdateType.Manual));
483483

484-
InputSystem.s_Manager.updateMask = InputUpdateType.Manual;
484+
InputSystem.manager.updateMask = InputUpdateType.Manual;
485485

486486
Assert.That(!runtime.onShouldRunUpdate.Invoke(InputUpdateType.Dynamic));
487487
Assert.That(!runtime.onShouldRunUpdate.Invoke(InputUpdateType.Fixed));
488488
Assert.That(runtime.onShouldRunUpdate.Invoke(InputUpdateType.Manual));
489489

490-
InputSystem.s_Manager.updateMask = InputUpdateType.Default;
490+
InputSystem.manager.updateMask = InputUpdateType.Default;
491491

492492
Assert.That(runtime.onShouldRunUpdate.Invoke(InputUpdateType.Dynamic));
493493
Assert.That(runtime.onShouldRunUpdate.Invoke(InputUpdateType.Fixed));

Assets/Tests/InputSystem/CoreTests_Remoting.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public void Remote_CanConnectInputSystemsOverEditorPlayerConnection()
297297
connectionToPlayer.Bind(fakeEditorConnection, true);
298298

299299
// Bind a local remote on the player side.
300-
var local = new InputRemoting(InputSystem.s_Manager);
300+
var local = new InputRemoting(InputSystem.manager);
301301
local.Subscribe(connectionToEditor);
302302

303303
connectionToEditor.Subscribe(local);
@@ -479,11 +479,11 @@ public FakeRemote()
479479
runtime = new InputTestRuntime();
480480
var manager = InputManager.CreateAndInitialize(runtime, null, true);
481481

482-
local = new InputRemoting(InputSystem.s_Manager);
482+
local = new InputRemoting(InputSystem.manager);
483483
remote = new InputRemoting(manager);
484484

485485
var remoteInstaller = new GlobalsInstallerObserver(manager);
486-
var localInstaller = new GlobalsInstallerObserver(InputSystem.s_Manager);
486+
var localInstaller = new GlobalsInstallerObserver(InputSystem.manager);
487487

488488
// The installers will ensure the globals environment is prepared right before
489489
// the receiver processes the message. There are some static fields, such as
@@ -501,14 +501,12 @@ public FakeRemote()
501501

502502
public void SwitchToRemoteState()
503503
{
504-
InputSystem.s_Manager = remoteManager;
505-
InputStateBuffers.SwitchTo(remoteManager.m_StateBuffers, remoteManager.defaultUpdateType);
504+
InputSystem.TestHook_SwitchToDifferentInputManager(remoteManager);
506505
}
507506

508507
public void SwitchToLocalState()
509508
{
510-
InputSystem.s_Manager = localManager;
511-
InputStateBuffers.SwitchTo(localManager.m_StateBuffers, localManager.defaultUpdateType);
509+
InputSystem.TestHook_SwitchToDifferentInputManager(localManager);
512510
}
513511

514512
public void Dispose()

Assets/Tests/InputSystem/CoreTests_State.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ public void State_FixedUpdatesAreDisabledByDefault()
11961196
{
11971197
Assert.That(InputSystem.settings.updateMode, Is.EqualTo(InputSettings.UpdateMode.ProcessEventsInDynamicUpdate));
11981198
Assert.That(runtime.onShouldRunUpdate(InputUpdateType.Fixed), Is.False);
1199-
Assert.That(InputSystem.s_Manager.updateMask & InputUpdateType.Fixed, Is.EqualTo(InputUpdateType.None));
1199+
Assert.That(InputSystem.manager.updateMask & InputUpdateType.Fixed, Is.EqualTo(InputUpdateType.None));
12001200
}
12011201

12021202
[Test]

Packages/com.unity.inputsystem/InputSystem/Actions/InputActionAsset.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ IEnumerator IEnumerable.GetEnumerator()
869869
internal void MarkAsDirty()
870870
{
871871
#if UNITY_EDITOR
872-
InputSystem.TrackDirtyInputActionAsset(this);
872+
DirtyAssetTracker.TrackDirtyInputActionAsset(this);
873873
#endif
874874
}
875875

Packages/com.unity.inputsystem/InputSystem/Actions/InputActionState.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ private void EnableControls(int mapIndex, int controlStartIndex, int numControls
11201120
"Control start index out of range");
11211121
Debug.Assert(controlStartIndex + numControls <= totalControlCount, "Control range out of bounds");
11221122

1123-
var manager = InputSystem.s_Manager;
1123+
var manager = InputSystem.manager;
11241124
for (var i = 0; i < numControls; ++i)
11251125
{
11261126
var controlIndex = controlStartIndex + i;
@@ -1149,7 +1149,7 @@ private void DisableControls(int mapIndex, int controlStartIndex, int numControl
11491149
"Control start index out of range");
11501150
Debug.Assert(controlStartIndex + numControls <= totalControlCount, "Control range out of bounds");
11511151

1152-
var manager = InputSystem.s_Manager;
1152+
var manager = InputSystem.manager;
11531153
for (var i = 0; i < numControls; ++i)
11541154
{
11551155
var controlIndex = controlStartIndex + i;
@@ -1225,7 +1225,7 @@ private void HookOnBeforeUpdate()
12251225

12261226
if (m_OnBeforeUpdateDelegate == null)
12271227
m_OnBeforeUpdateDelegate = OnBeforeInitialUpdate;
1228-
InputSystem.s_Manager.onBeforeUpdate += m_OnBeforeUpdateDelegate;
1228+
InputSystem.manager.onBeforeUpdate += m_OnBeforeUpdateDelegate;
12291229
m_OnBeforeUpdateHooked = true;
12301230
}
12311231

@@ -1234,7 +1234,7 @@ private void UnhookOnBeforeUpdate()
12341234
if (!m_OnBeforeUpdateHooked)
12351235
return;
12361236

1237-
InputSystem.s_Manager.onBeforeUpdate -= m_OnBeforeUpdateDelegate;
1237+
InputSystem.manager.onBeforeUpdate -= m_OnBeforeUpdateDelegate;
12381238
m_OnBeforeUpdateHooked = false;
12391239
}
12401240

@@ -1267,7 +1267,7 @@ private void OnBeforeInitialUpdate()
12671267
// Go through all binding states and for every binding that needs an initial state check,
12681268
// go through all bound controls and for each one that isn't in its default state, pretend
12691269
// that the control just got actuated.
1270-
var manager = InputSystem.s_Manager;
1270+
var manager = InputSystem.manager;
12711271
for (var bindingIndex = 0; bindingIndex < totalBindingCount; ++bindingIndex)
12721272
{
12731273
ref var bindingState = ref bindingStates[bindingIndex];
@@ -2102,7 +2102,7 @@ internal void StartTimeout(float seconds, ref TriggerState trigger)
21022102
Debug.Assert(trigger.controlIndex >= 0 && trigger.controlIndex < totalControlCount, "Control index out of range");
21032103
Debug.Assert(trigger.interactionIndex >= 0 && trigger.interactionIndex < totalInteractionCount, "Interaction index out of range");
21042104

2105-
var manager = InputSystem.s_Manager;
2105+
var manager = InputSystem.manager;
21062106
var currentTime = trigger.time;
21072107
var control = controls[trigger.controlIndex];
21082108
var interactionIndex = trigger.interactionIndex;
@@ -2131,7 +2131,7 @@ private void StopTimeout(int interactionIndex)
21312131

21322132
ref var interactionState = ref interactionStates[interactionIndex];
21332133

2134-
var manager = InputSystem.s_Manager;
2134+
var manager = InputSystem.manager;
21352135
manager.RemoveStateChangeMonitorTimeout(this, interactionState.timerMonitorIndex, interactionIndex);
21362136

21372137
// Update state.

Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ public unsafe long ExecuteCommand<TCommand>(ref TCommand command)
557557
var commandPtr = (InputDeviceCommand*)UnsafeUtility.AddressOf(ref command);
558558

559559
// Give callbacks first shot.
560-
var manager = InputSystem.s_Manager;
560+
var manager = InputSystem.manager;
561561
manager.m_DeviceCommandCallbacks.LockForChanges();
562562
for (var i = 0; i < manager.m_DeviceCommandCallbacks.length; ++i)
563563
{

0 commit comments

Comments
 (0)