Before installing Aura SDK Plugin for Unity, the Lighting Service (which includes Aura SDK) and Aura Layer Manager should be installed first. See Installation for details.
AuraPlugin.unitypackage
package file.AuraPlugin.unitypackage
that you got in previous step.Then the Import Unity Package window pops up. There is a complete demo project in this package. You can import all of them if you want. In this example, we want to create a new project from scratch, so just keep Plugin (and the DLL's in it) checked and uncheck everything else.
Then click Import to import the plugin.
CubeBehaviour
that associates with it.CubeBehavior.cs
for AURA features. First of all, you need to import AURA namespace by using AsusAuraWrapper
: AsusAuraService
object, and another data for breathing effect: Start()
, we can initialize AURA by creating the AsusAuraService
object. A try
/catch
block is used here in case there is something bad happened while initialization. Note that AsusAuraService.EnterSDKMode()
must be called right after the AsusAuraService
object has been created. Update()
, we can update color of LED's on AURA devices. In this example, the delta-time data is used to create some sort of "Breathing" effect. Note that we don't have to call something like IAuraSdk::Apply()
; it is handled internally in the plugin. AsusAuraService.ExitSDKMode()
needs to be called. It can be done in the OnApplicationQuit()
method: