Skip to content

Conversation

@ManlyMarco
Copy link
Collaborator

@ManlyMarco ManlyMarco commented Jan 26, 2026

Copied from BepInEx to keep support for other plugin loaders.

Fixes #329
Fixes #443
Fixes #615
Fixes #728
Fixes #797
Partial #653

Copied from BepInEx to keep support for other plugin loaders.
Copilot AI review requested due to automatic review settings January 26, 2026 00:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for both Unity's legacy and new input systems by introducing an abstraction layer called UnityInput. The code is copied from BepInEx to maintain compatibility with other plugin loaders.

Changes:

  • Added UnityInput abstraction layer that automatically detects and uses the best available input system (legacy Input or new InputSystem)
  • Migrated all direct Input class usage to UnityInput.Current throughout the UI and plugin code
  • Added Unity.InputSystem.dll references to the project file for both net35 and net6.0 target frameworks

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/XUnity.Common/XUnity.Common.csproj Added Unity.InputSystem.dll references for both target frameworks
src/XUnity.Common/Utilities/UnityInput.cs New file containing abstraction layer with automatic input system detection and support for both legacy and new input systems
src/XUnity.AutoTranslator.Plugin.Core/UI/XuaWindow.cs Migrated from direct Input usage to UnityInput.Current
src/XUnity.AutoTranslator.Plugin.Core/UI/TranslationAggregatorWindow.cs Migrated from direct Input usage to UnityInput.Current
src/XUnity.AutoTranslator.Plugin.Core/UI/TranslationAggregatorOptionsWindow.cs Migrated from direct Input usage to UnityInput.Current
src/XUnity.AutoTranslator.Plugin.Core/UI/GUIUtil.cs Migrated from direct Input usage to UnityInput.Current
src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs Migrated from direct Input usage to UnityInput.Current for keyboard input handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ManlyMarco ManlyMarco merged commit d25cf68 into master Jan 26, 2026
6 checks passed
@ManlyMarco ManlyMarco deleted the UnityInput branch January 26, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants