diff --git a/Assets/Tests/InputSystem/Plugins/UnityRemoteTests.cs b/Assets/Tests/InputSystem/Plugins/UnityRemoteTests.cs index fc2c8d1001..47e02a737d 100644 --- a/Assets/Tests/InputSystem/Plugins/UnityRemoteTests.cs +++ b/Assets/Tests/InputSystem/Plugins/UnityRemoteTests.cs @@ -22,6 +22,18 @@ public override void TearDown() base.TearDown(); } + // The other tests bypass the native editor hook, so this is what catches GenericRemote moving assemblies. + [Test] + [Category("Remote")] + [TestCase("AddMessageHandler")] + [TestCase("RemoveMessageHandler")] + [TestCase("SetGyroEnabled")] + [TestCase("SetGyroUpdateInterval")] + public void Remote_CanFindEditorRemoteAPI(string methodName) + { + Assert.That(UnityRemoteSupport.GetUnityRemoteAPIMethod(methodName), Is.Not.Null); + } + // We have a kill-switch as a safety fallback just in case this feature somehow // ends up causing problems. [Test] diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index b16cbcca2a..8cf9a23eb3 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed polling for interaction phases (such as `WasPerformedThisFrame`) being missed during `Update` due to interaction timeouts sometimes occurring during the later before-render period when a before-render device (such as an XR HMD) is added. This means that timeouts and interactions like Hold may now wait to perform until the next frame instead of the earliest chance during before-render. [UUM-147719](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-147719) +- Fixed touch input from Unity Remote 5 being ignored in Unity 6000.5 and newer. [UUM-155327](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-155327) ## [1.20.1] - 2026-10-05 diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Plugins/UnityRemote/UnityRemoteSupport.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Plugins/UnityRemote/UnityRemoteSupport.cs index 4dd8cc234e..7204183e6a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Plugins/UnityRemote/UnityRemoteSupport.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Plugins/UnityRemote/UnityRemoteSupport.cs @@ -61,14 +61,14 @@ private static void OnSettingsChanged() SetNativeMessageHandler(ProcessMessageFromUnityRemote); } - private static MethodInfo GetUnityRemoteAPIMethod(string methodName) - { - var editorAssembly = typeof(EditorApplication).Assembly; - var genericRemoteClass = editorAssembly.GetType("UnityEditor.Remote.GenericRemote"); - if (genericRemoteClass == null) - return null; + // GenericRemote moved from the UnityEditor assembly to UnityEditor.GenericRemoteModule in 6000.5. + private static readonly Type s_GenericRemoteType = + typeof(EditorApplication).Assembly.GetType("UnityEditor.Remote.GenericRemote") + ?? Type.GetType("UnityEditor.Remote.GenericRemote, UnityEditor.GenericRemoteModule"); - return genericRemoteClass.GetMethod(methodName); + internal static MethodInfo GetUnityRemoteAPIMethod(string methodName) + { + return s_GenericRemoteType?.GetMethod(methodName); } private static void SetNativeMessageHandler(Func handler)