An efficient and versatile input system for Unity.
Перейти к файлу
Paulius Dervinis 343e8bf57e
FIX: Readd the current gamepad rect to gamepad visualiser (#2053)
2024-11-19 17:09:04 +02:00
.fork NEW: Added Repository QoL Fork commands and Windows commands shortcuts for Powershell (#1930) 2024-05-17 09:17:00 -04:00
.github CHANGE: PR template text (#2031) 2024-10-18 13:07:32 +03:00
.yamato FIX: The "Add Control Scheme..." popup now requires explicit Save/Close user action (case ISXB-1131) (#2044) 2024-11-06 18:18:09 +01:00
Assets FIX: Readd the current gamepad rect to gamepad visualiser (#2053) 2024-11-19 17:09:04 +02:00
Docs DOCS: New Timing and Latency section (DOCF-1179) (#1994) 2024-10-18 13:45:04 +01:00
ExternalSampleProjects FIX: InputDeviceTester only shows first touch contact (IXSB-1017) (#1985) 2024-08-19 13:11:24 +03:00
Packages [Input System] Fixed pasting bindings into empty Input Action asset (case ISXB-1180) (#2046) 2024-11-13 09:29:41 +00:00
ProjectSettings CHANGE: Re-enable temporarily disabled tests due to ProjectWide actions (ISX-1455) (#1745) 2023-09-11 09:56:36 +02:00
Tools Fixing trunk CI issues (#1638) 2023-02-13 20:17:38 +01:00
.buginfo INTERNAL: add pacakge name to buginfo file (#1770) 2023-10-09 12:21:37 +02:00
.gitattributes FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
.gitconfig FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
.gitignore Add API additions to assist with polling workflow (#1795) 2024-01-18 09:05:59 +00:00
.gitmodules CHANGE: Analyzer submodule (#657) 2019-06-04 08:27:46 +02:00
.repoconfig FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
AndroidBuildTests.cmd FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
AndroidBuildTests.ps1 FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
AndroidRunTests.cmd FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
AndroidRunTests.ps1 FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
CONTRIBUTIONS.md FIX: Broken link in CONTRIBUTIONS.md (#1367) 2021-07-13 10:29:24 +02:00
LICENSE.md Refresh project to 2021.3.19f1 (#1645) 2023-02-26 21:07:08 +01:00
README.md NEW: Added GameRotationVector type (UUM-42538) (#1737) 2023-09-11 11:32:18 +02:00
Third Party Notices.md Added Third Party Notices.md doc (#1519) 2022-04-05 07:09:07 +02:00
cleangarbage.cmd NEW: Added Repository QoL Fork commands and Windows commands shortcuts for Powershell (#1930) 2024-05-17 09:17:00 -04:00
cleangarbage.ps1 FIX: Update format and cleangarbage to package changes 2018-02-28 19:00:20 -08:00
cleangarbage.sh FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
countsloc.sh FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
format.cmd NEW: Added Repository QoL Fork commands and Windows commands shortcuts for Powershell (#1930) 2024-05-17 09:17:00 -04:00
format.ps1 NEW: Added Repository QoL Fork commands and Windows commands shortcuts for Powershell (#1930) 2024-05-17 09:17:00 -04:00
format.sh FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
git-add-api.ps1 FIX: Inconsistent line endings in repo (#1244). 2020-12-02 15:36:18 +01:00
git-prep.ps1 CHANGE: Remove obsolete patching of doctools in CI runs (#1295). 2021-03-19 13:19:51 +01:00
projectlist.txt CHANGE: Add [Ignore] on TODO tests (#237). 2018-09-10 12:54:54 -07:00
steam_appid.txt WIP: Steam controller support (#221). 2018-08-14 11:36:26 -07:00

README.md

Unity Input System (Package)

The Unity Input System package is an extension package to the Unity Platform which provides a system to configure game actions and access input devices to interact with Unity content. It is intended to be a more powerful, flexible, and configurable replacement to Unity Input API (the UnityEngine.Input class).

Prerequisites

The current version of the Input System requires Unity 2019 LTS, Unity 2020 LTS, Unity 2021 or Unity Beta (may be subject to instabilities) and included tooling to compile and run. The recommended way of installing Unity is via Unity Hub.

Getting Started

For instructions on how to get started using the Input System within Unity see Input System Manual - Installation.

Tutorials on how to use the Input System are available as part of:

  • Unity Learn - Using the Input System in Unity - Video tutorials on how to use the Input System in Unity.
  • Warriors Demo Project - A demo project illustrating a wide range of tools and features in the Input System, including local multi-player using different input methods.
  • Example projects part of this repository:
    • Custom Composite - Shows how to implement and register a custom InputBindingComposite.
    • Custom Device - Demonstrates how to add and author a custom device.
    • Custom Device Usages - An example of how to tag devices with custom "usages" and how to bind actions specifically to devices with only those usages.
    • Gamepad Mouse Cursor - An example of UI pointer navigation driven from gamepad input.
    • In-game Hints - Illustrates how to display text in the UI that involves action bindings as well as object interaction.
    • Input Recorder - Demonstrates how to use InputEventTrace and InputRecorder.
    • On-screen Controls - Demonstrates how to set up and use on-screen gamepad-like controls.
    • Rebinding UI - Demonstrates how to set up a rebinding UI to reconfigure bindings during run-time.
    • Simple Demo - Shows how to set up a simple character controller using actions, action asset as well as using the PlayerInput component.
    • Simple Multiplayer - Demonstrates a basic split-screen local multiplayer setup where players can join by pressing buttons on the supported devices to join the game.
    • UI vs Game Input - Illustrates how to handle input and resolve ambiguities that arise when overlaying UI elements in the game-view.
    • Visualizers - Provides various input data visualizations for common devices.

How to use a released versions of the package within a Unity project

All released versions of the Input System package are available via the Unity Package Manager, see Input System Manual - Installation for instructions how to fetch the package and compatible versions of samples and install them into your Unity project.

How to use the latest changes of the package in a Unity project

To test out the latest (unreleased) changes:

  1. Clone develop. The intention is to always keep the develop branch in a releasable state, but it reflects current development and may contain bugs or unexpected behavior that was not present in the latest released version.
  2. Add the local package to your project by following the steps described in Unity Manual - Installing a package from a local folder and select Packages/com.unity.inputsystem/package.json.
  1. Clone develop or the desired branch or release tag.
  2. Open the root folder of the repository in the Unity Editor. This way you have access to tests and samples that are excluded when importing only the package into another Unity project.

During development, run Input System automated tests by selecting Window > General > Test Runner to access the Test Runner and select Run All for PlayMode or EditMode tests.

Contribution & Feedback

This project is developed by Unity Technologies but welcomes user contributions and feedback.

If you have any feedback or questions about Unity's Input System, you are invited to join us on the Unity Forums.

If you want to contribute to the development of the Input System see CONTRIBUTIONS.md for additional information.

License

This package is distributed under the Unity Companion License for Unity-dependent projects license with addition of third party licenses which applies to the Assets/Samples/RebindingUI example project specifically.