Date | Package File (.unitypackage) | Demo Project |
---|---|---|
06/18/2021 | v2021.2 | v2021.2 (Unity 2020.3.9) |
02/10/2021 | v2021.1 | v2021.1 |
MAD Gaze SDK provides the API Controls which allows you to perform the basic control to your device.
*This SDK is applicable to both MAD Gaze GLOW and MAD Gaze GLOW Plus model. (Except 3D Mode is only available on MAD Gaze GLOW).
The application shall be
Tested Unity Editor Versions - Unity 2020.2 - Unity 2019.4.1 - Unity 2019.3.12 - Unity 2019.2.3*
To check if MAD Gaze GLOW / MAD Gaze GLOW PLus is connected. (with permissions provided)
bool isConnected = MadControl.Instance.isGlowConnected();
To check the model of connected smart glasses.
MadControl.DeviceType type = MadControl.Instance.getDeviceType();
if (type == MadControl.DeviceType.GlowPlus) {
//Do something with MAD Gaze GLOW Plus
} else if (type == MadControl.DeviceType.Glow) {
//Do something with MAD Gaze GLOW
} else if (type == MadControl.DeviceType.Unknown) {
//No connected devices or cannot determine the connected device
}
Brightness Level: 0 (Almost Dark) - 7 (The Brightest)
To get the current brightness level of the screen.
//Get the current screen brightness level.
int currentBrightness = MadControl.Instance.getBrightness();
To set the brightness level of the screen.
//Setting the brightness of the screen at 4. (0-7)
MadControl.Instance.setBrightness(4);
*3D Mode is not available on MAD Gaze GLOW Plus.
To check if 3D mode is now turned on.
//Check if 3D Mode is now turned on.
bool is3DModeOn = MadControl.Instance.is3DModeOn();
To turn on the 3D mode programatically.
//Turn on the 3D Mode
bool isSuccess = MadControl.Instance.turnOn3DMode();
To turn off the 3D mode programatically.
//Turn off the 3D Mode
bool isSuccess = MadControl.Instance.turnOff3DMode();
To calibrate the gyroscope sensor on smart glasses inside your apps.
This process takes 5 seconds to complete. During the calibration, the device should remain unmoved.
We recommend users to place the smart glasses on a flat surface during calibration.
//Setup a 5-second calibration session.
MadControl.Instance.startGyroCalibration(
()=>{
//Calibration completed.
},
() =>{
//Calibration failed.
//Please do not move your device during the calibration.
}
);
To calibrate the gyroscope sensor on smart glasses with MAD Gaze Connector.
MadConnect.Instance.calibrateGyroscope(
()=>{
//Calibration completed.
},
(errorMsg) =>{
//Calibration failed.
}
);
You can check DeviceControlDemo in MADGaze/Demo/Scenes.
This library is licensed under the MAD Gaze - Terms of Use.