// unity
← Back to homeOllo SDK Docs | 6:14 PM

// Unity Integration

Ollo SDK for Unity uses a native plugin + C# wrapper.

/01

Import the package

  1. Drag the OlloSDK.unitypackage into your project
  2. This creates:
    • Plugins/Ollo/ollosdk.dll
    • Scripts/OlloSDK.cs
    • Example scene
/02

Usage

using UnityEngine;
using Ollo;

public class BlinkTest : MonoBehaviour
{
    void Start()
    {
        if (OlloSDK.Start())
            Debug.Log("Blinkd started " + OlloSDK.GetVersion());
        else
            Debug.LogError("Blinkd error " + OlloSDK.GetLastError());
    }

    void Update()
    {
        OlloSDK.PollBlinkEvents();
    }
}
/03

Error handling

int err = OlloSDK.GetLastError();

Same error table as Quickstart.

/04

Example: Reacting in gameplay

void OnBlink(OlloBlinkEvent e)
{
    // e.timestampMs
    // e.intensity
    // e.side
}

Tie this into animation, VFX, or AI behavior.