PlayKit.ai

Getting Started

Install and configure the PlayKit Unreal SDK

Getting Started

This guide walks you through installing and configuring the PlayKit SDK in your Unreal Engine project.

Installation

Download the Plugin

  1. Download the latest PlayKitSDK plugin from the PlayKit Dashboard
  2. Extract the plugin to your project's Plugins folder:
YourProject/
├── Content/
├── Source/
└── Plugins/
    └── PlayKitSDK/
        ├── Content/
        ├── Resources/
        ├── Source/
        └── PlayKitSDK.uplugin
  1. Restart Unreal Editor if it's already running

Enable the Plugin

  1. Open your project in Unreal Editor
  2. Go to Edit > Plugins
  3. Search for "PlayKit"
  4. Enable the PlayKitSDK plugin
  5. Restart the editor when prompted

Configuration

Project Settings

  1. Go to Edit > Project Settings
  2. Navigate to Plugins > PlayKit SDK
  3. Configure the following settings:
SettingDescription
Game IDYour application ID from PlayKit Dashboard
Developer TokenYour developer token (for development only)
Base URLAPI endpoint (default: https://api.playkit.ai)
Default Chat ModelDefault model for text generation
Default Image ModelDefault model for image generation

Remember to clear the Developer Token before shipping your game. Use Player Authentication in production.

Quick Start

Blueprint Example

Create a simple AI chat in Blueprints:

  1. Create a new Blueprint Actor
  2. Add the following nodes in the Event Graph:
Event BeginPlay
    �?Create Chat Client (PlayKit|Factory)
    �?Store result in variable "ChatClient"
  1. To send a message and get a response:
ChatClient �?Chat (Message: "Hello, who are you?")
    �?On Success �?Print String (Response Text)

C++ Example

#include "Client/PlayKitChatClient.h"

// In Actor header — add UPlayKitChatClient as a component in the editor,
// or declare it as UPROPERTY(VisibleAnywhere):
UPROPERTY(VisibleAnywhere)
UPlayKitChatClient* ChatClient;

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

    // UPlayKitChatClient is an ActorComponent — find it on this Actor.
    ChatClient = FindComponentByClass<UPlayKitChatClient>();

    // Bind the response event
    ChatClient->OnChatResponse.AddDynamic(this, &AMyActor::HandleChatResponse);

    // Set a system prompt and send a message
    ChatClient->SystemPrompt = TEXT("You are a helpful assistant.");
    ChatClient->GenerateText(TEXT("Hello, who are you?"));
}

void AMyActor::HandleChatResponse(const FPlayKitChatResponse& Response)
{
    if (Response.bSuccess)
        UE_LOG(LogTemp, Log, TEXT("AI Response: %s"), *Response.Content);
    else
        UE_LOG(LogTemp, Error, TEXT("Error: %s"), *Response.ErrorMessage);
}

Verify Installation

To verify the SDK is correctly installed:

  1. Open a Blueprint
  2. Right-click in the Event Graph
  3. Search for "PlayKit"
  4. You should see categories like:
    • PlayKit|Factory
    • PlayKit|SDK
    • PlayKit|Auth
    • PlayKit|NPC

If you see these nodes, the SDK is installed correctly.

Example Content

The SDK includes example content in the Plugins/PlayKitSDK/Content/Examples folder:

  • Login Example: Shows how to implement player authentication
  • Chat Example: Demonstrates text generation and conversation

To use the examples:

  1. Enable "Show Plugin Content" in the Content Browser settings
  2. Navigate to PlayKitSDK Content/Examples
  3. Open the example maps to see working implementations

Troubleshooting

Plugin Not Showing

  • Ensure the plugin folder structure is correct
  • Check that PlayKitSDK.uplugin exists in the plugin root
  • Try regenerating project files (right-click .uproject > Generate Visual Studio Project Files)

Blueprint Nodes Not Found

  • Verify the plugin is enabled in Edit > Plugins
  • Restart the editor after enabling
  • Check Output Log for any plugin loading errors

Authentication Errors

  • Verify your Game ID is correct
  • Ensure your Developer Token is valid (check expiration)
  • Check network connectivity to the API endpoint

Next Steps