Moverio Controller Function SDK

Developer's Guide for Unity plug-in

2. Application development

2.1. Quick start

This guide will show you how to set up your development environment and try out the Moverio Controller Function UnityPlugin sample.

Requirements

Hardware

  • Moverio controller
  • USB Type-C cable to connect the Moverio controller to your PC

Software

  • Unity 2020.3LTS
    • Make sure to include Android Build Support during installation
  • Download Moverio Controller Function UnityPlugin 1.1.0 > The SDK is downloaded as MoverioControllerFunctionUnityPlugin_1.1.0.unitypackage.
  • Android SDK 9.0 (API Level 28) or later installed using the Android Studio SDK Manager

Creating a Unity project

  1. Open Unity and create a new 3D project.
  2. Import the Moverio Controller Function UnityPlugin.
    1. Select Assets> Import Package> Custom Package.
    2. Select the downloaded MoverioControllerFunctionUnityPlugin_1.1.0.unitypackage.
    3. In the Importing Package dialog, make sure all options are selected and click Import.

Open sample scene

  1. Find and open the Menu scene in Unity's Project window.
    > Assets > MoverioControllerFunctionUnityPlugin > Samples > UIControl > Scenes

Configure build settings

  1. Open the Build Settings window from File> Build Settings.
  2. Select Android and click Switch Platform.
  3. Click Player Settings in the Build Settings window.
  4. In the Inspector window, configure Player Settings as follows:
configuration value
Player Settings > Other Settings > Package Name Create a unique app ID using the Java package name format.
For example, com.example.helloMoverio
Player Settings > Other Settings > Minimum API Level Android 9.0 'Pie' (API level 28) or higher Android 9.0

Build and run the sample

  1. Enable developer options and USB debugging on the Moverio controller.
  2. Connect the Moverio controller to your PC.
  3. In the Unity Build Settings window, click Build and Run.
  4. Remove the Moverio controller from your PC.
  5. Tap the button of the sample you want to check.

Supplementary item of sample

  • When KEY_LOCK_ENABLE is set on the setting of KeyLock, KEY_LOCK_DISABLE will be set after 5 second automatically.

Limitations of the sample

  • This sample was created with Unity2020.3LTS.
  • t will not work with Unity2018 or earlier versions.

2.2. UI control

Be able to control the setting of keys of the Moverio controller, and so on.

2.2.1. Function list

Function Contents
UI mode controlGet/Set UI mode
Keycode management Get/set key code of physical key
Key enable/disable control Get/set physical key enable/disable
Lighted setting of LED enable/disable control Get/Set lighted setting of controller LED enable/disable
KeyLock feature enable/disable control Get/Set KeyLock feature (physical key/display touch) enable/disable
Reset key state Reset physical key settings to default
Recconect Reconnecting dedicated controller

The above functions are implemented by UIControl of sample scene

Label Function
UIMode UI mode control
KeyAssign Keycode control
KeyEnable Key enable/disable control
ControllerLedMode Lighted setting of LED enable/disable control
KeyLock KeyLock feature enable/disable control
Reset Reset key state
Reconnect Reconnect

For details of the function, refer to Moverio Controller Function SDK Developer's Guide.

2.2.2. UI control tutorial

This section describes how to control UI with Unity application.

  1. Create a Unity project and import the package.

    Refer to Create a Unity project for how to create.

  2. Drag and drop MoverioUI into the hierarchy window.

  3. Create a script.

  4. Add using.

    Open the script created in 3 and describe as using MoverioControllerFunctionUnityPlugin;

    using MoverioControllerFunctionUnityPlugin;
  5. Call a function.

    Describe the API you want to use like MoverioUI.GetKeyAssign

    Refer to the following script for the description method of each function.

    Lebel

    Script

    UIMode

    GetUIModeController.cs
    SetUIModeController.cs

    KeyAssign

    GetKeyAssignController.cs
    SetKeyAssignController.cs

    KeyEnable

    GetKeyEnableController.cs
    SetKeyEnableController.cs

    ControllerLedMode

    GetControllerLedModeController.cs
    SetControllerLedModeController.cs

    KeyLock

    GetKeyLockController.cs
    SetKeyLockController.cs

    Reset

    ResetToDefaultController.cs

    Reconnect

    UIReconnectController.cs

  6. Attach script to GameObject

Go to Top