// ollo-for-unreal-engine
← Back to homeOllo SDK Docs | 8:45 AM

// Ollo for Unreal Engine

Ollo integrates directly into Unreal Engine as a ready-to-use plugin, giving both Blueprint and C++ gameplay systems real-time blinks and gaze.

/01

Quick start

Requirements

  • Unreal Engine 5.7, on Windows x64
  • A webcam, or a frame source of your own
  • To package a game: Visual Studio 2022 17.14 with MSVC 14.44, which the Visual Studio Installer lists as MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest). Unreal Engine 5.7 needs it to package any C++ code, and Ollo's plugin is compiled into your game, so a Blueprint-only project needs it too. An older toolset fails at the game's final link, inside the engine's own libraries.
  • The Ollo plugin for Unreal, from your dashboard: ollo-unreal-windows-x86_64-v<version>.zip

Install the plugin

  1. Extract the zip into your project's Plugins folder (create it if there is none). It adds Plugins/Ollo/: the plugin and its source, and in ThirdParty/ollo/bin/ the SDK, its model and the ollo command.
  2. Enable the plugin: Edit > Plugins, search for Ollo, tick it, and restart the editor. Ollo is off until you do, because it's your project's .uproject that lists it: without that, Blueprints can't find Ollo's nodes and packaging stops with errors.
  1. Sign the machine in, once, from a terminal in your project's folder, and approve the code in your browser (SDK Activation):

    Plugins\Ollo\ThirdParty\ollo\bin\ollo.exe sign-in
    

    The editor's Output Log prints this command, with its full path, whenever the machine is not signed in, and your plan ([Ollo SDK] License: Pro) once it is. Until then, a game you play in the editor shows Ollo's evaluation watermark, and tracking stops after 10 minutes each run.

  2. Check the game's App Id in Project Settings > Plugins > Ollo, and register it under Games & builds on your dashboard.

App Id

The App Id names your game to Ollo: you register it on your dashboard, and every build stamp names it.

It starts as unreal. followed by your project's name in lowercase letters and digits: unreal.mygame for a project called MyGame. Change it to any id you like, such as com.studio.mygame, using letters, digits and . _ : -. It is kept in Config/DefaultGame.ini, with the rest of your project's settings.

Settle it before you ship: a stamp works only for the App Id it names, so a shipped game keeps its id.

Packaging

Nothing to set up. On a paid plan, every packaged build of a registered game is stamped as Unreal builds it, whether you package from Platforms > Windows > Package Project or with RunUAT BuildCookRun. The log says:

Ollo: build stamped for unreal.mygame

The stamp goes into the game's pak. The packaged game checks it offline when it starts, and runs with no watermark and no time limit on any machine. Your players never sign in and never contact Ollo.

  • Unreal asks for a new stamp when it rebuilds the game's build rules: when you package after changing the project or the plugin, not on every compile. Each stamp is listed under Games & builds.
  • A stamp is made for the Ollo release in the plugin. After updating the plugin, package again.
  • On a build server, set OLLO_BUILD_TOKEN to a build token from your dashboard: builds made there are stamped with it.

A build that can't be stamped still completes, and its log says why and what to do, for example:

Ollo: no build stamp: this machine is not signed in. Run "...\ollo.exe" sign-in, then package again.

Without a stamp, the packaged game is an evaluation: watermarked, with tracking that stops after 10 minutes each time it runs. Do what the warning says and package again: the next build asks for a stamp again.

The watermark

While Ollo is not licensed, the game's viewport shows one line in its bottom-right corner, such as Ollo not signed in (stops in 9 min) or Ollo evaluation (stops in 9 min). It shows:

  • in a game you play in the editor (Play in Editor, or Standalone Game) while the machine is not signed in;
  • in a packaged game built without a stamp.

It shows whether or not your game starts Ollo. It goes away within seconds of signing the machine in, and never shows in a stamped build.

/02

Using Ollo in Blueprints

Recommended defaults

SettingValue
CameraIndex0
Width640
Height480
FPS30
Enable Pose NormalizationEnabled
Telemetry EnabledEnabled
Enable GazeDisabled

Leave ModelPath empty to use the built-in runtime model.

Notes

  • Bind delegates before calling Start() so startup failures and early events are not missed.
  • Ollo stops by itself when the game exits. Call Stop Ollo to end tracking sooner.

C++ Quick Start

Add "Ollo" to your module's dependencies in its .Build.cs:

PublicDependencyModuleNames.AddRange(new[] { "Core", "CoreUObject", "Engine", "Ollo" });

Basic Actor Example

// MyBlinkActor.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "OlloTypes.h"
#include "MyBlinkActor.generated.h"

UCLASS()
class AMyBlinkActor : public AActor
{
    GENERATED_BODY()
protected:
    virtual void BeginPlay() override;
    virtual void EndPlay(const EEndPlayReason::Type Reason) override;

private:
    UFUNCTION() // Required for dynamic delegates
    void OnBlink(const FOlloBlinkEvent& Event);

    UFUNCTION()
    void HandleStartupFailed(const FString& Error);
};
// MyBlinkActor.cpp
#include "MyBlinkActor.h"
#include "OlloSubsystem.h"

void AMyBlinkActor::BeginPlay()
{
    Super::BeginPlay();

    UOlloSubsystem* Ollo = UOlloSubsystem::Get(this);
    if (!Ollo) return;

    // Bind before Start so you don't miss a startup failure
    Ollo->OnBlinkDetected.AddDynamic(this, &AMyBlinkActor::OnBlink);
    Ollo->OnStartupFailed.AddDynamic(this, &AMyBlinkActor::HandleStartupFailed);

    // Empty string = use built-in model, camera 0, defaults
    Ollo->Start(FString(), 0, 640, 480, 30, true, true);
}

void AMyBlinkActor::EndPlay(const EEndPlayReason::Type Reason)
{
    if (UOlloSubsystem* Ollo = UOlloSubsystem::Get(this))
    {
        Ollo->OnBlinkDetected.RemoveDynamic(this, &AMyBlinkActor::OnBlink);
        Ollo->OnStartupFailed.RemoveDynamic(this, &AMyBlinkActor::HandleStartupFailed);
        Ollo->Stop();
    }
    Super::EndPlay(Reason);
}

void AMyBlinkActor::OnBlink(const FOlloBlinkEvent& Event)
{
    UE_LOG(LogTemp, Log,
        TEXT("Blink #%lld | %.1f ms | quality: %d"),
        Event.Sequence, Event.DurationMs, (int)Event.Quality);

    // Do whatever: trigger animation, spawn effect, etc.
}

void AMyBlinkActor::HandleStartupFailed(const FString& Error)
{
    UE_LOG(LogTemp, Error, TEXT("[Ollo SDK] Could not start: %s"), *Error);
}

Key rule: Any function you bind to a DYNAMIC delegate must itself be a UFUNCTION otherwise the binding silently does nothing at runtime.

Using Ollo in your game

Get the subsystem from anything with a world context:

UOlloSubsystem* Ollo = UOlloSubsystem::Get(this);

Tracking carries across level changes, so start Ollo once and stop it when you no longer need it. Stop() is safe to call more than once, and IsRunning() says whether tracking is on.

Events

Events are the way to read blinks. They fire on the game thread, so they're safe to use directly in gameplay, animation and Blueprint graphs. Keep handlers light.

DelegateIn BlueprintsWhen
OnBlinkDetectedOn Player BlinkFor each blink.
OnMicrosleepOn Player MicrosleepWhen eyes that stayed shut for over a second reopen.
OnStartupFailedOn Startup FailedStart failed, with the error message.

The API Reference lists the fields of FOlloBlinkEvent, and of the state, performance and gaze structs.

Polling

For Tick-driven systems, animation graphs and behavior trees:

FunctionWhat it returns
IsBlinkDetected()True if a blink has happened since the last call. Reading it clears it, so call it from one place, once a Tick.
GetBlinkCount()Blinks since tracking started.
GetLastBlinkTime()The time of the last blink, in seconds.
IsEyeClosed()Whether the eyes are closed right now.
GetState()Tracking state, as an FOlloState.
GetPerformance()How tracking is running, as an FOlloPerformance.

Gaze

Gaze is off until you pass bEnableGaze to Start, and it needs calibrating. The API Reference has the steps.

FunctionWhat it does
AddGazeCalibrationPoint(X, Y, bPersistent = true)Tells Ollo where the player is looking right now. Returns false if it can't use this frame: try again on the next one.
GetGaze()Where the player is looking, as an FOlloGaze.
ClearGazeCalibration()Forgets all calibration.

Feeding your own frames

For custom capture pipelines, virtual cameras, XR and remote streams, start with CameraIndex -1, then call this each frame:

bool FeedFrameRGBA(
    const TArray<uint8>& Pixels,
    int32 Width,
    int32 Height,
    double TimestampSec
)

Pixels needs at least Width * Height * 4 bytes of RGBA, and TimestampSec can't go backwards. It returns false if the frame is refused.

When Ollo doesn't start

Start returns false and OnStartupFailed fires with the message. GetLastErrorString() and GetLastErrorCode() give it again later, and the API Reference lists every code with what to do.

Error code 8 means the evaluation ended: the game ran without a license for 10 minutes, and Ollo won't start again until it runs again. Sign the machine in, or package a stamped build. See The watermark.

Start(...)

bool Start(
    const FString& ModelPath,
    int32 CameraIndex = 0,
    int32 Width = 640,
    int32 Height = 480,
    int32 FPS = 30,
    bool bEnablePoseNormalization = true,
    bool bTelemetryEnabled = true,
    bool bEnableGaze = false
)
ParameterDescription
ModelPathPath to a custom model. Leave empty to use the built-in model.
CameraIndexWebcam device index, or -1 to feed the frames yourself.
WidthCapture resolution width.
HeightCapture resolution height.
FPSTarget camera framerate.
bEnablePoseNormalizationStabilizes tracking under head movement.
bTelemetryEnabledLets this session send telemetry, if ollo telemetry on has turned it on (see SDK Activation). False keeps this session from sending any.
bEnableGazeTurns gaze on.

License state

GetLicenseState()

UFUNCTION(BlueprintPure, Category="Ollo|License")
FOlloLicenseState GetLicenseState() const;

What Ollo's license allows the running game, as the SDK decided it; in Blueprints, Get License State. Cheap enough to call every frame. The watermark already shows it, so a game doesn't need it: use it to show the license in your own UI, or to log it.

FOlloLicenseState

FieldDescription
SummaryThe license in words, as the watermark and the editor's Output Log say it: Pro, Licensed build, Not signed in (stops in 9 min).
bLicensedTracking without limit: in the editor, the machine is signed in; in a packaged game, its stamp is valid.
bWatermarkThe evaluation watermark shows.
bCheckedThe first license check has finished. Until then the editor says Checking license….
bEditorThe editor, or a game it plays; false in a packaged game.
PlanThe account's plan, such as pro; empty in a packaged game.
DaysLeftWhole days until the machine's license ends; -1 when it doesn't.
bEvaluatingThe game has tracked without a license: its 10 minutes are running.
EvaluationSecondsLeftSeconds of tracking left: -1 while licensed, 0 once the evaluation has ended.
StatusThe last check's outcome; 0 is OK.
DetailWhy, when Status isn't 0. English, for logs.