6Labs >

6labs SDK for Unreal

This section explains how to integrate the 6labs SDK into your Unreal Engine apps on Windows.

1. Download and Import the Module

The 6labs SDK is provided as an Unreal Engine plugin.

Add the module to your Unreal project:

  1. Download the package containing the latest version of 6labs SDK for Unreal Engine.
  2. Extract the plugin into your project’s Plugins directory (YourProject/Plugins/SixLabsSDK/).
  3. Confirm that the plugin is enabled:
    • In the Unreal Editor, go to Edit > Plugins .
    • Search for “6Labs SDK” and confirm it is enabled.
  4. Add module dependency:
    • In your game module’s Build.cs, add: PublicDependencyModuleNames.Add("SixLabsSDK");

2. Start Observing Gameplay

Use the Init() method to initialize the SDK and start observing gameplay, as illustrated below:

#include "SixLabsSubsystem.h"

USixLabsSubsystem* SixLabs = GetSubsystem();

// Start observing gameplay

SixLabs->Init(TEXT("optional_player_in_game_id"), TEXT("optional_developer_payload_here"));

// ... gameplay happens — session data is uploaded automatically ...

Important Information

  • If InGameId is not passed, the observed session may be discarded and will not be used for AI analysis. Without it, sessions cannot be attributed to a player, which is required for downstream insights.
  • Ensure that you obtain user consent before observing gameplay. The SDK does not automatically request permission; consent handling must be implemented in your game logic.
  • As a suggested best practice, you may include a disclosure of gameplay observation in your game’s EULA or privacy policy.
  • To properly test it, you need to create a platform-specific build and run it on a physical device.

Reference

The following is the method reference for the Init() method.

Method Signature

SixLabs->Init(TEXT("optional_player_in_game_id"), TEXT("optional_developer_payload_here"));

Parameters

Parameter Type Required Description
InGameId FString No An optional user identifier within the game. If not passed, it defaults to an empty string.
DeveloperPayload FString No Optional developer-defined metadata associated with the session. This value is forwarded as-is with the session request and can be used to attach custom tracking or contextual information. Providing richer DeveloperPayload can significantly improve AI-powered analysis and session understanding.
Example:

  • Acquisition channel
  • Campaign ID
  • User segment (e.g., new, returning, whale)
  • A/B test variant (e.g., variant_a, variant_b) — split users into cohorts and compare gameplay metrics across them in the 6Labs dashboard.
  • Internal reference identifiers

3. Advanced Controls

In most integrations, calling Init() is sufficient to begin observing gameplay. For advanced or custom control, you may also use StartSession() and StopSession() directly.

3.1 Start Observing

Use the StartSession() method when you want to explicitly control when gameplay observation begins.

#include "SixLabsSubsystem.h"

USixLabsSubsystem* SixLabs = GetSubsystem();

// Start observing gameplay

SixLabs->StartSession(TEXT("optional_player_in_game_id"), TEXT("optional_developer_payload_here"));

// ... gameplay happens — session data is uploaded automatically ...

Method Signature

SixLabs->StartSession(TEXT("optional_player_in_game_id"), TEXT("optional_developer_payload_here"));

Parameters

Parameter Type Required Description
InGameId FString No An optional user identifier within the game. If not passed, it defaults to an empty string.
DeveloperPayload FString No Optional developer-defined metadata associated with the session. This value is forwarded as-is with the session request and can be used to attach custom tracking or contextual information. Providing richer DeveloperPayload can significantly improve AI-powered analysis and session understanding.

3.2 Stop Observing

Use the StopSession() method to stop observing gameplay.

// Stop gameplay observation

SixLabs->StopSession();

Important Information

  • Stops the active gameplay observation.
  • You can call StartSession() again later to start gameplay observation.
×

Table of Contents

6labs SDK for Unreal

Table of Contents

Document Rev. 1.0

Text copied to clipboard
Link copied to clipboard
Questions? Please reach out to us at dev-support@6labs.ai