This section describes how to control sensor with the Unity app.
Create a Unity project and import the package
Refer to Create a Unity project for how to create
Drag and drop MoverioInput into the hierarchy window
Create a script
Add using
Open the script created in 3 and describe as using MoverioBasicFunctionUnityPlugin;
using MoverioBasicFunctionUnityPlugin;
Call a function
Describe the API you want to use like MoverioInput.GetAccAccuracy
Refer to the following script for the description method of each function
label | script |
---|---|
Accelerometer | AccelerometerController.cs |
Magnetic field | MagneticFieldController.cs |
Gyroscope | GyroscopeController.cs |
Ambient light | LightController.cs |
Gravity | GravityController.cs |
Linear accelerometer | LinearAccelerometerController.cs |
Rotation vector | RotationVectorController.cs |
Game Rotation vector | GameRotationVectorController.cs |
Uncalibrated Accelerometer | AccelerometerUncalibratedController.cs |
Uncalibrated Magnetic field | MagneticFieldUncalibratedController.cs |
Uncalibrated Gyroscope | GyroscopeUncalibratedController.cs |
Attach script to GameObject
Please refer to API Reference for API specifications.
This section describes how to control Headset Detect acquisition with the Unity app.
Create a Unity project and import the package
Refer to Create a Unity project for how to create
Drag and drop MoverioInput into the hierarchy window
Create a script
Add using
Open the script created in 3 and describe as using MoverioBasicFunctionUnityPlugin;
using MoverioBasicFunctionUnityPlugin.Type;
Create a function to be notified of Headset Detect
public void OnHeadsetTapDetect(SensorDataAccuracy accuracy)
{
}
public void OnHeadsetMotionDetect(SensorDataAccuracy accuracy)
{
}
public void OnHeadsetStationayDetect(SensorDataAccuracy accuracy)
{ }
Attach script to GameObject
Click Moverio Input in the Hierarchy window
Click the Moverio Input (Script) On Headset Tap Detect and On Headset Motion Detect and On Headset Stationay Detect “+” in the MoverioInput Inspector to add an event.
Drag and drop the GameObject to which the script is attached in 6. in the hierarchy window to each event.
Select the function to receive On Rcord Started and On Record Stopped event notifications.
Please refer to API Reference for API specifications.