- Notifications
You must be signed in to change notification settings - Fork318
An efficient and versatile input system for Unity.
License
Unity-Technologies/InputSystem
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The Unity Input System package is an extension package to theUnity 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 toUnity Input API (theUnityEngine.Input
class).
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 viaUnity Hub.
For instructions on how to get started using the Input System within Unity seeInput 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
andInputRecorder
. - 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.
- Custom Composite - Shows how to implement and register a custom
All released versions of the Input System package are available via the Unity Package Manager, seeInput System Manual - Installation
for instructions how to fetch the package and compatible versions of samples and install them into your Unity project.
To test out the latest (unreleased) changes:
- Clonedevelop. 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. - Add the local package to your project by following the steps described inUnity Manual - Installing a package from a local folder and select
Packages/com.unity.inputsystem/package.json
.
- Clonedevelop or the desired branch or release tag.
- 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 selectingWindow > General > Test Runner
to access the Test Runner and selectRun All
forPlayMode
orEditMode
tests.
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 theUnity Forums.
If you want to contribute to the development of the Input System seeCONTRIBUTIONS.md for additional information.
This package is distributed under theUnity Companion License for Unity-dependent projects license with addition ofthird party licenses which applies to theAssets/Samples/RebindingUI example project specifically.
About
An efficient and versatile input system for Unity.