Code Sample: MRHand.cs Script for Input in Native UWP Unity* Apps with Motion Controllers.

File(s):Download
License:Intel Sample Source Code License Agreement
Optimized for... 
OS:Windows® 10
Hardware:N/A
Software:
(Programming Language, tool, IDE, Framework)
C#, Unity*
Prerequisites:Familiarity with the Unity’s C# scripting. Unity 5 or beyond installed and configured.

Introduction

Attach this script as component to a gameobject in Unity. After setting up a Tracked Pose Driver component in the gameobject to the correct device and handedness the MRHand.cs script will provide you with public Input functions to obtain controller button presses to drive your game.

Get Started

Download the code from GitHub* and read Develop and Port Windows* Mixed Reality UWP Applications in Unity* Software for a better understanding of how to perform multicore development.

References

https://docs.unity3d.com/ScriptReference/XR.WSA.Input.InteractionSourceState.html

https://docs.unity3d.com/ScriptReference/XR.WSA.Input.InteractionManager.html

Updated Log

Created July 27, 2018

Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.
Возможность комментирования русскоязычного контента была отключена. Узнать подробнее.