Skip to content

Commit 06e08df

Browse files
unitydavidloclaude
andauthored
FIX: [Port] [UUM-155327] [Input System] Fixed Unity Remote touch input being ignored (#2499)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 05e45dd commit 06e08df

3 files changed

Lines changed: 20 additions & 7 deletions

File tree

‎Assets/Tests/InputSystem/Plugins/UnityRemoteTests.cs‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ public override void TearDown()
2222
base.TearDown();
2323
}
2424

25+
// The other tests bypass the native editor hook, so this is what catches GenericRemote moving assemblies.
26+
[Test]
27+
[Category("Remote")]
28+
[TestCase("AddMessageHandler")]
29+
[TestCase("RemoveMessageHandler")]
30+
[TestCase("SetGyroEnabled")]
31+
[TestCase("SetGyroUpdateInterval")]
32+
public void Remote_CanFindEditorRemoteAPI(string methodName)
33+
{
34+
Assert.That(UnityRemoteSupport.GetUnityRemoteAPIMethod(methodName), Is.Not.Null);
35+
}
36+
2537
// We have a kill-switch as a safety fallback just in case this feature somehow
2638
// ends up causing problems.
2739
[Test]

‎Packages/com.unity.inputsystem/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### Fixed
1111

1212
- 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)
13+
- 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)
1314

1415
## [1.20.1] - 2026-10-05
1516

‎Packages/com.unity.inputsystem/InputSystem/Editor/Plugins/UnityRemote/UnityRemoteSupport.cs‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ private static void OnSettingsChanged()
6161
SetNativeMessageHandler(ProcessMessageFromUnityRemote);
6262
}
6363

64-
private static MethodInfo GetUnityRemoteAPIMethod(string methodName)
65-
{
66-
var editorAssembly = typeof(EditorApplication).Assembly;
67-
var genericRemoteClass = editorAssembly.GetType("UnityEditor.Remote.GenericRemote");
68-
if (genericRemoteClass == null)
69-
return null;
64+
// GenericRemote moved from the UnityEditor assembly to UnityEditor.GenericRemoteModule in 6000.5.
65+
private static readonly Type s_GenericRemoteType =
66+
typeof(EditorApplication).Assembly.GetType("UnityEditor.Remote.GenericRemote")
67+
?? Type.GetType("UnityEditor.Remote.GenericRemote, UnityEditor.GenericRemoteModule");
7068

71-
return genericRemoteClass.GetMethod(methodName);
69+
internal static MethodInfo GetUnityRemoteAPIMethod(string methodName)
70+
{
71+
return s_GenericRemoteType?.GetMethod(methodName);
7272
}
7373

7474
private static void SetNativeMessageHandler(Func<IntPtr, bool> handler)

0 commit comments

Comments
 (0)