XR 게임 또는 애플리케이션에서 입력을 처리하는 주요 옵션은 다음과 같습니다.
경우에 따라 이러한 옵션 중 두 가지 이상을 동시에 사용할 수도 있습니다.예를 들어 XR 인터랙션 툴킷을 사용하여 사용자가 환경의 오브젝트를 선택할 수 있고, 입력 시스템을 사용하여 일시 정지 기능을 컨트롤러 버튼에 바인딩하고, 컨트롤러 게임 오브젝트를 애니메이션화할 수 있도록 XR.Node API를 사용하여 하드웨어 상태를 읽을 수 있습니다.
Note: The OpenXR plug-in, which supports many different XR devices and controllers, provides its own, additional way to access XR input and tracking data. You can still use the XR Interaction Toolkit, the Input System, or the XR.InputDevice and XR.Node APIs. (The legacy Input Manager is not supported when you use the OpenXR plugin.) See Input in Unity OpenXR for more information.
The XR Interaction Toolkit abstracts input into a set of user input actions, such as “hover,” select,“ and ”activate." These actions correspond to conventional XR input
The XR Interaction Toolkit builds on the Input System and the base UnityEngine.XR API to support XR input. It provides a near ready-to-use set of components for handling XR input and defining interactions between the user and the environment and the scene UI. Even if you choose not to use the toolkit’s interaction system, you can use the input components as a starting point to save setup effort. The toolkit provides two basic approaches to handling input:
See Actions for more information about Input System Actions.
팁:XR 인터랙션 툴킷에서 사용할 수 있는 스타터 에셋은 행동 기반 입력을 사용할 때 필요한 대부분의 반복되는 설정 작업을 없애주는 프리셋과 입력 행동을 제공합니다.
XR 인터랙션 툴킷은 다음과 같은 기본 상호작용을 정의합니다.
The XR Interaction Toolkit uses these interactions with additional components to let the user interact with the environment. For example, if you add a GrabInteractable component to an object, the user can trigger Select to grab it. By default, select is bound to the grip button of an XR controller, but you can change the binding as you see fit. You can also use your own actions and bindings alongside those defined by the toolkit.
You can access the controls of XR Controllers, such as buttons and joysticks, in the same ways you would access any game controller. To access tracking data, use the XR.InputTracking API in code. You can also use the Input System TrackedPoseDriver component to control a GameObject with a tracked device such as a HMD or controller. The TrackedPoseDriver component is also available from the Legacy Input Helpers package, in case you are not using the Input System.
참고:OpenXR 플러그인을 사용하는 경우 입력 시스템을 사용해야 합니다.입력 관리자는 지원되지 않습니다.
The XR Input APIs provide the lowest level access to XR input. The API lets you find connected XR devices and read their tracking data and state of their input hardware.
XR 입력 API에 대한 자세한 내용은 Unity XR 입력을 참조하십시오.
Device makers and other third parties often provide their own input and interaction APIs that you can use instead of or in addition to those provided by Unity. For example,
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.