This section describes how to manage the device status 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 MoverioInfo into the hierarchy window
Create a script
Add using
Open the script created in 3 and describe as using MoverioBasicFunctionUnityPlugin;
using MoverioBasicFunctionUnityPlugin;
Call the function
Describe the API you want to use like MoverioInfo.GetHeadsetSerialNumber
Refer to the following script for the description method of each function.
Label | Script |
---|---|
Headset serial number | GetSerialNumberController.cs |
Headset product name | GetProductNameController.cs |
Attach the script to the GameObject
Please refer to API Reference for API specifications.
This section describes how to receive the headset system status notification in the Unity app.
Create a Unity project and import the package
Refer to Create a Unity project for how to create
Drag and drop MoverioInfo into the hierarchy window
Create a script
Create a function to be notified of headset connection/disconnection
public void OnHeadsetAttached()
{
}
public void OnHeadsetDetached()
{ }
Attach the script to the GameObject
Click MoverioInfo in the hierarchy window
Add an event by clicking “+” of On Headset Attached or On HeadSset Detached of Moverio Info (Script) in the Inspector of MoverioInfo
Drag and drop the GameObject to which the script is attached in step 5 in the hierarchy window to the event.
Select the function to receive the On Headset Attached or On Headset Detached event notification