Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7f400e0
REFACTOR: Reorganize package structure into Runtime/Editor folders
jfreire-unity Nov 27, 2025
9306b7e
Update assemblies dependencies
jfreire-unity Nov 28, 2025
9e71717
Split editor and runtime dependencies for composites, interactions an…
jfreire-unity Nov 28, 2025
e169d1c
Split core input processing classes into Editor and Runtime assemblies
jfreire-unity Nov 28, 2025
f46d3bc
Add editor specific callback for InputActionAsset
jfreire-unity Nov 28, 2025
9163992
Split analytics into Editor and Runtime assemblies
jfreire-unity Nov 28, 2025
df3dee6
Split most Plugins into Editor and Runtime assemblies
jfreire-unity Nov 28, 2025
5acc184
Temporarily comment TouchSimulation
jfreire-unity Nov 28, 2025
4cb5fa9
Temporarly comment FastMouse to deal with errors later
jfreire-unity Nov 28, 2025
8f6ce25
Update TestFixture to deal with Editor and Runtime split changes
jfreire-unity Nov 28, 2025
1f70b67
Temporarily comment EnhancedTouchTests to deal with errors later
jfreire-unity Nov 28, 2025
ecff638
Update changed APIs for CoreTests Editor and PWA
jfreire-unity Nov 28, 2025
238b898
Temporarly comment tests to fix errors in UITest and CoreTests_Analytics
jfreire-unity Nov 28, 2025
f556493
Fix wrong resources paths
jfreire-unity Dec 5, 2025
84efcfb
Removing more Editor dependencies from critical Runtime code
jfreire-unity Jan 12, 2026
107c47a
Remove more Editor code from Runtime code for control schemes and rem…
jfreire-unity Jan 12, 2026
9d1353a
Remove editor dependencies from EnhancedTouchSupport
jfreire-unity Jan 12, 2026
a67857b
Remove editor dependencies from input action related classes
jfreire-unity Jan 12, 2026
5a8185f
Remove editor define from Editor folder class.
jfreire-unity Jan 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions Assets/QA/Tests/XRDeviceActions/XRDeviceActions.asmdef
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "XRDeviceActions",
"rootNamespace": "",
"references": [
"GUID:28d8685fae23c21419ef42894cb9b075",
"GUID:75469ad4d38634e559750d17036d5f7c",
"GUID:2bafac87e7f4b9b418d9448d219b01ab"
"GUID:2bafac87e7f4b9b418d9448d219b01ab",
"GUID:d46adbc216ac24e9a86f26d7a54b2384",
"GUID:92e8d8d0b9a5e4f44b24c3e04451d190"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "Unity.InputSystem.InGameHints",
"rootNamespace": "",
"references": [
"GUID:75469ad4d38634e559750d17036d5f7c",
"GUID:2bafac87e7f4b9b418d9448d219b01ab"
"GUID:2bafac87e7f4b9b418d9448d219b01ab",
"GUID:d46adbc216ac24e9a86f26d7a54b2384",
"GUID:92e8d8d0b9a5e4f44b24c3e04451d190"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "Unity.InputSystem.Recorder",
"rootNamespace": "",
"references": [
"GUID:75469ad4d38634e559750d17036d5f7c"
"GUID:d46adbc216ac24e9a86f26d7a54b2384"
],
"optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": []
"versionDefines": [],
"noEngineReferences": false
}
3 changes: 2 additions & 1 deletion Assets/Samples/ProjectWideActions/ProjectWideActions.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "ProjectWideActions",
"rootNamespace": "",
"references": [
"GUID:75469ad4d38634e559750d17036d5f7c"
"GUID:d46adbc216ac24e9a86f26d7a54b2384",
"GUID:92e8d8d0b9a5e4f44b24c3e04451d190"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"name": "Unity.InputSystem.RebindingUI",
"rootNamespace": "",
"references": [
"GUID:75469ad4d38634e559750d17036d5f7c"
"GUID:d46adbc216ac24e9a86f26d7a54b2384",
"GUID:92e8d8d0b9a5e4f44b24c3e04451d190"
],
"optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": []
"versionDefines": [],
"noEngineReferences": false
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "UnityEngine.InputSystem.Samples.UIvsGameInput",
"rootNamespace": "",
"references": [
"GUID:75469ad4d38634e559750d17036d5f7c",
"GUID:2bafac87e7f4b9b418d9448d219b01ab"
"GUID:2bafac87e7f4b9b418d9448d219b01ab",
"GUID:d46adbc216ac24e9a86f26d7a54b2384",
"GUID:92e8d8d0b9a5e4f44b24c3e04451d190"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"name": "InputSystem.Samples.Visualizers",
"rootNamespace": "",
"references": [
"GUID:75469ad4d38634e559750d17036d5f7c"
"GUID:d46adbc216ac24e9a86f26d7a54b2384",
"GUID:92e8d8d0b9a5e4f44b24c3e04451d190"
],
"optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": []
"versionDefines": [],
"noEngineReferences": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"UnityEditor.TestRunner",
"Unity.InputSystem",
"Unity.InputSystem.TestFramework",
"Unity.InputSystem.TestSupport"
"Unity.InputSystem.TestSupport",
"Unity.InputSystem.Editor"
],
"includePlatforms": [
"Editor"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "Unity.InputSystem.TestSupport",
"rootNamespace": "",
"references": [
"GUID:75469ad4d38634e559750d17036d5f7c"
"GUID:d46adbc216ac24e9a86f26d7a54b2384",
"GUID:92e8d8d0b9a5e4f44b24c3e04451d190"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
10 changes: 5 additions & 5 deletions Assets/Tests/InputSystem/APIVerificationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ internal static bool IgnoreTypeForDocsByNamespace(string @namespace)

[Test]
[Category("API")]
[TestCase("Keyboard", "Devices/Precompiled/FastKeyboard.cs")]
[TestCase("Mouse", "Devices/Precompiled/FastMouse.cs")]
[TestCase("Touchscreen", "Devices/Precompiled/FastTouchscreen.cs")]
[TestCase("Keyboard", "Runtime/Devices/Precompiled/FastKeyboard.cs")]
[TestCase("Mouse", "Runtime/Devices/Precompiled/FastMouse.cs")]
[TestCase("Touchscreen", "Runtime/Devices/Precompiled/FastTouchscreen.cs")]
public void API_PrecompiledLayoutsAreUpToDate(string layoutName, string filePath)
{
var fullPath = "Packages/com.unity.inputsystem/InputSystem/" + filePath;
var fullPath = "Packages/com.unity.inputsystem/" + filePath;
var existingCode = File.ReadAllText(fullPath);

// May be a git checkout with CRLF auto-conversion on. Strip all '\r' characters.
Expand Down Expand Up @@ -800,7 +800,7 @@ public void API_DocumentationManualDoesNotHaveMissingOrUnusedImages()
[Category("API")]
public void API_DefaultInputActionsClassIsUpToDate()
{
const string assetFile = "Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/DefaultInputActions.inputactions";
const string assetFile = "Packages/com.unity.inputsystem/Runtime/Plugins/PlayerInput/DefaultInputActions.inputactions";
Assert.That(File.Exists(assetFile), Is.True);

var actions = new DefaultInputActions();
Expand Down
4 changes: 2 additions & 2 deletions Assets/Tests/InputSystem/CoreTests_Analytics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,8 @@ public void Analytics_ShouldReportBuildAnalytics_WhenHavingSettingsAssetWithCust
[TestCase(InputSystemComponent.PlayerInputManager, typeof(PlayerInputManager))]
[TestCase(InputSystemComponent.InputSystemUIInputModule, typeof(InputSystemUIInputModule))]
[TestCase(InputSystemComponent.StandaloneInputModule, typeof(StandaloneInputModule))]
[TestCase(InputSystemComponent.VirtualMouseInput, typeof(VirtualMouseInput))]
[TestCase(InputSystemComponent.TouchSimulation, typeof(TouchSimulation))]
// [TestCase(InputSystemComponent.VirtualMouseInput, typeof(VirtualMouseInput))]
// [TestCase(InputSystemComponent.TouchSimulation, typeof(TouchSimulation))]
[TestCase(InputSystemComponent.OnScreenButton, typeof(OnScreenButton))]
[TestCase(InputSystemComponent.OnScreenStick, typeof(OnScreenStick))]
[Category("Analytics")]
Expand Down
44 changes: 22 additions & 22 deletions Assets/Tests/InputSystem/CoreTests_Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,12 @@ public void Editor_DomainReload_CanRemoveDevicesDuringDomainReload()
InputSystem.AddDevice<Keyboard>(); // just to make sure keyboard stays as-is

currentTime = 1;
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);

runtime.ReportInputDeviceRemoved(device);

currentTime = 2;
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);

InputSystem.Update();

Expand Down Expand Up @@ -2632,7 +2632,7 @@ public void Editor_CanListOptionalControlsForLayout()
[Category("Editor")]
public void Editor_CanIconsForLayouts()
{
const string kIconPath = "Packages/com.unity.inputsystem/InputSystem/Editor/Icons/";
const string kIconPath = "Packages/com.unity.inputsystem/Editor/Icons/";
var skinPrefix = EditorGUIUtility.isProSkin ? "d_" : "";
var scale = Mathf.Clamp((int)EditorGUIUtility.pixelsPerPoint, 0, 4);
var scalePostFix = scale > 1 ? $"@{scale}x" : "";
Expand Down Expand Up @@ -2822,10 +2822,10 @@ public void Editor_InputEventsOccurringWhileGoingIntoPlayMode_AreDiscarded()

// We need to actually pass time and have a non-zero start time for this to work.
currentTime = 1;
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystem.QueueStateEvent(mouse, new MouseState { position = new Vector2(234, 345) });
currentTime = 2;
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);

InputSystem.Update();

Expand Down Expand Up @@ -2915,8 +2915,8 @@ public void Editor_InitializeInEditor_EnablesProjectWideActions()
Assert.That(InputSystem.actions.enabled, Is.True);

// Calling exit play mode callbacks will disable them
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredEditMode);

Assert.That(InputSystem.actions.enabled, Is.False);

Expand All @@ -2927,8 +2927,8 @@ public void Editor_InitializeInEditor_EnablesProjectWideActions()
// `InputSystem.InitializeInEditor()` is called. Before this test was introduced, project-wide actions were
// enabled after entering play mode again which would lead to a different behavior than Player
// builds.
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);

Assert.That(InputSystem.actions.enabled, Is.False);
}
Expand All @@ -2946,14 +2946,14 @@ public void Editor_LeavingPlayMode_DestroysAllActionStates()
InputSystem.AddDevice<Gamepad>();

// Enter play mode.
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);

// This simulates enabling project-wide actions, which is done before just before entering play mode,
// called from InputSystem.InitializeInEditor().
if (InputSystem.actions)
InputSystem.actions.Enable();

InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);

DisableProjectWideActions();

Expand All @@ -2965,8 +2965,8 @@ public void Editor_LeavingPlayMode_DestroysAllActionStates()
Assert.That(InputSystem.s_Manager.m_StateChangeMonitors[0].count, Is.EqualTo(1));

// Exit play mode.
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredEditMode);

Assert.That(InputActionState.s_GlobalState.globalList.length, Is.Zero);
// Won't get removed, just cleared.
Expand All @@ -2980,8 +2980,8 @@ public void Editor_LeavingPlayMode_RemovesAllInputUsersAndStopsListeningForUnpai
var gamepad = InputSystem.AddDevice<Gamepad>();

// Enter play mode.
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);

var user = InputUser.PerformPairingWithDevice(gamepad);
++InputUser.listenForUnpairedDeviceActivity;
Expand All @@ -2991,8 +2991,8 @@ public void Editor_LeavingPlayMode_RemovesAllInputUsersAndStopsListeningForUnpai
Assert.That(InputUser.all, Has.Count.EqualTo(1));

// Exit play mode.
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredEditMode);

Assert.That(user.valid, Is.False);
Assert.That(InputUser.all, Has.Count.Zero);
Expand All @@ -3017,7 +3017,7 @@ public void Editor_LeavingPlayMode_ReenablesAllDevicesTemporarilyDisabledDueToFo

Assert.That(gamepad.enabled, Is.False);

InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);

Assert.That(gamepad.enabled, Is.True);
Assert.That(gamepad.disabledWhileInBackground, Is.False);
Expand Down Expand Up @@ -3087,15 +3087,15 @@ private void AssertAssetIsUnmodifiedAfterExitingPlayMode(Action<InputActionAsset
AssetDatabase.TryGetGUIDAndLocalFileIdentifier(asset, out var assetGuid, out long _);

// Enter play mode.
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);

asset = AssetDatabase.LoadAssetAtPath<InputActionAsset>(m_TestAssetPath);
action?.Invoke(asset);

// Exit play mode.
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredEditMode);

var actualAsset = AssetDatabase.LoadAssetAtPath<InputActionAsset>(m_TestAssetPath);
Assert.That(actualAsset.ToJson(), Is.EqualTo(originalJson), message);
Expand Down
4 changes: 2 additions & 2 deletions Assets/Tests/InputSystem/CoreTests_ProjectWideActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void ProjectWideActions_CanEnableCurrentActionMapOfPlayerInput(string act
Assert.That(ReferenceEquals(playerInput.actions, InputSystem.actions));

#if UNITY_EDITOR
InputSystem.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.ExitingEditMode);
#endif

// This makes sure to call PlayerInput.OnEnable()
Expand All @@ -180,7 +180,7 @@ public void ProjectWideActions_CanEnableCurrentActionMapOfPlayerInput(string act
// We do this on the editor to make sure project-wide actions maintain the enabled state
// after entering PlayMode.
#if UNITY_EDITOR
InputSystem.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);
InputSystemEditorInitializer.OnPlayModeChange(PlayModeStateChange.EnteredPlayMode);
Assert.That(playerInput.actions.enabled, Is.EqualTo(expectedResult));
#endif

Expand Down
Loading