Import the required packages into an existing Unity project.
- Import “nodesk_beta_1_0.unitypackage” into the Unity project.
- (For Oculus Go / Oculus Quest only) Import Unity Asset “Bluetooth LE for iOS, tvOS and Android”. The Example directory and the Documentation directory are unnecessary, so do not import them.
- Add Nodesk / Prefabs / Resources / NodeskPrefabs to the scene.
- (If TextMeshPro is not installed) A dialog to import TextMeshPro will open. Select Import.
Guide position adjustment
The default setting is to follow the field of view.
To turn off tracking, disable BodyLocked attached to NodeskPrefabs. Change the position and rotation of NodeskPrefabs to adjust the position.
Please refer to the following site for details of BodyLocked.
Guide size adjustment
Change the size of the Guide displayed on the screen by adjusting the Scale of NodeskPrefabs
Set the same value for X, Y, and Z.
Changing the input device
Change the InputDevices of NodeskSettigs attached to NodeskPrefabs. The possible values are as follows.
|Selected value||Explanation||Supported platforms|
|Bluetoothle||Input using a smartphone app (Android / iOS).||
|Joystick||Input using a joystick. For debugging.||
|Quest||Input using a smartphone app (Android / iOS).||
|Input using Mouse. For debugging.||
|Input using Mac touchpad. For debugging.||
Please refer to the following to install the app on your smartphone.
Install iOS app
Install Android app
Add the following to Unity's Input settings according to your JoyStick.
|Joystick_Horizonal1||The X axis of the stick used for Drag operation.|
|Joystick_Vertical1||Y axis of the stick used for drag operation.|
|Joystick_Horizonal2||X axis of the stick used for Flick operation.|
|Joystick_Vertical2||Y axis of the stick used for Flick operation.|
|Joystick_L_Press||Button used to determine Drag operation (unused).|
|Joystick_R_Press||This button is used to determine the Flick operation. Used to select the middle key for Flick operation.|
The following settings must be added to AndroidManifest.xml to accept input from Quest Touch controllers.
<uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1"/>
The operation method is Drag operation with the left controller stick, Flick operation with the right controller stick, and middle key selection by pushing the right controller stick.
Changing the input method
You can set whether to use the conversion area. When using, press the E button in the center of the lower panel while characters are entered in the conversion area, and the entered characters are confirmed and notified to KeyEventHandler.
If not used, KeyEventHandler is notified immediately after typing.
Receive character input and command events
Create an event handler that receives input characters and various events, and register it in NodeskPrefabs.
- Create any class that inherits NodeskKeyEventHandler.
- Implement TypeText method.
|Signature||public virtual void TypeText(string text)|
- Implement TypeCommand method.
|Signature||public virtual void TypeCommand(TypingCommand command, float value)|
- Attach the created class to any object.
- Attach the attached object to the NodeEventPrefabs KeyEventHandlers property.