Unity

Register for licence key

To use our SDK a license key is required which is generated after a short registration and your acceptance of the license terms.

--> Register to get the license key

Our beta-sdk is actually completely free for non commercial usage/testing. See details in the license terms.

Please contact us for commercial use. info@evomo.de


Requirements

  • The EvomoUnitySDK is currently only available for iOS.
  • The EvomoUnitySDK requires a minimum Xcode 11.4 with Swift 5.2
  • The EvomoUnitySDK requires a minimum iOS target of 12.1.
  • The EvomoUnitySDK only supports 64 bit builds.

How to install

Simply Download and import the Evomo MotionAI unity package. Download release on Github

Import Package in Unity with Menu: Assets > Import Package > Custom Package...

Usage

Init the Evomo Sdk

Before tracking movement events, you must init the Evomo SDK. Here is an example of how you could do that using the Awake method of a script:

private void Awake()
{
Evomo.Init(EvomoReady, "licenseID"); // Insert your licenseID as string
}
private void EvomoReady()
{
Debug.Log("Evomo ready to track movements!");
//Continue with setting up your game stuff
}

Track Movements

Before you start tracking movements, you should subscribe to the events that you are interested in.

here is a simple example:

private void SubscribeToEvomoEvents()
{
Evomo.OnLeft.AddListener(OnLeft);
Evomo.OnRight.AddListener(OnRight);
Evomo.OnJump.AddListener(OnJump);
Evomo.OnDuck.AddListener(OnDuck);
}
private void OnLeft()
{
//move character left
}
private void OnRight()
{
//move character right
}
private void OnJump()
{
//make character jump
}
private void OnDuck()
{
//make character duck
}

To start and stop tracking movements, use the following methods:

Evomo.StartTracking();
// use this option to define device orientation - default is buttonDown means Portrait mode with home button pointing to the ground
Evomo.StartTracking(deviceOrientation: Evomo.DeviceOrientation.buttonRight);
// use this option to define a specific classification model - default is "2115"
Evomo.StartTracking(classificationModel: "2115");
Evomo.StopTracking();

Building iOS Xcode project

From package version 2.1 the build process is enhanced by an automatic build pipeline. With the build pipeline, the necessary settings related to Xcode and CocoaPods are handled automatically.

Be sure to set the minimum iOS version to 12.1 and the supported arch to ARM64 only in your unity player settings before exporting.

  • You only have to install CocoaPods (min. 1.9.1) on your mac.
sudo gem install cocoapods
  • And navigate to the project folder and run pod install on the console.

!!! If you have another packages which have also CocoaPods included, you may have to create or adjust the podfile manually. !!! More details about manual pod setup