Version: Unity 6.2 Alpha (6000.2)
Language : English
Physics Profiler module
Mobile Keyboard

Input

Input in Unity refers to users sending signals from the outside world to your game or app using a physical device.

Unity supports input from many types of device, such as gamepads, mouse, keyboard, touchscreen, joystick, movement-sensors like accelerometers or gyroscopes, and VRVirtual Reality More info
See in Glossary
and ARAugmented Reality More info
See in Glossary
controllers. Almost every project requires input of some kind, whether it is to allow users to navigate a UI(User Interface) Allows a user to interact with your application. Unity currently supports three UI systems. More info
See in Glossary
, control a character in a game, or move around and interact with objects in virtual realityVirtual Reality (VR) immerses users in an artificial 3D world of realistic images and sounds, using a headset and motion tracking. More info
See in Glossary
.

Unity has two methods of implementing Input:

  • The Input System Package, which is newer, more flexible, and better supported.
  • The legacy Input ManagerSettings where you can define all the different input axes, buttons and controls for your project. More info
    See in Glossary
    (which includes the built-in Input class).

The Input System Package

Unity’s best support for input is provided by the Input System Package, which you install using the Package Manager.

This is the recommended solution for most projects. It provides an intuitive interface in the Editor to configure input, and provides a variety of workflows to suit your project and coding style.

The Actions Editor window, with some default actions provided by the Input System Package
The Actions Editor window, with some default actions provided by the Input System Package

Get started with the Input System Package.

Legacy projects

If you are supporting a legacy project or you need to use the older “Input Manager” for any other reason, see the legacy Input Manager documentation.




对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答
Physics Profiler module
Mobile Keyboard
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961