Skip to content

Quick Start Guide

This guide will help you implement your first feature using a gameDNA plugin. We’ll use the Online Subsystem Blueprintable plugin as an example, but the concepts apply to all our plugins.

Basic Setup

Before starting, ensure you’ve completed the Installation Guide and activated your license.

  1. Open Your Project

    Launch Unreal Editor with your project that has the plugin installed.

  2. Verify Plugin is Active

    Go to Edit → Project Settings → Plugins → gameDNA and confirm your license is active.

  3. Enable Required Modules

    For Online Subsystem Blueprintable, ensure these plugins are also enabled:

    • Online Subsystem
    • Online Subsystem Steam (or your target platform)

Your First Blueprint Example

Let’s create a simple login system using Blueprints.

  1. Create a New Blueprint

    Right-click in Content Browser → Blueprint ClassActor → Name it BP_LoginManager

  2. Add the Event Graph Logic

    Open the Blueprint and add the following:

    Event BeginPlay
    → Call "Initialize Online Subsystem" (gameDNA node)
    → Branch: Is Success?
    → True: Print String "Online Subsystem Ready!"
    → False: Print String "Failed to initialize"
  3. Add Login Function

    Create a custom event called “AttemptLogin”:

    Custom Event: AttemptLogin
    → Call "Login with Platform Credentials" (gameDNA node)
    → Bind to "On Login Complete" delegate
    → On Success: Print "Logged in as: " + Display Name
    → On Failure: Print "Login failed: " + Error Message
  4. Place in Level

    Drag BP_LoginManager into your level and press Play to test.

Your First C++ Example

For C++ developers, here’s how to implement the same functionality:

Update Build.cs

First, add the module dependency:

Source/YourGame/YourGame.Build.cs
PublicDependencyModuleNames.AddRange(new string[] {
"Core",
"CoreUObject",
"Engine",
"InputCore",
"OnlineSubsystemBlueprintable" // Add gameDNA plugin
});

Create Login Manager Class

Source/YourGame/LoginManager.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "OnlineSubsystemBlueprintable.h"
#include "LoginManager.generated.h"
UCLASS()
class YOURGAME_API ALoginManager : public AActor
{
GENERATED_BODY()
public:
ALoginManager();
virtual void BeginPlay() override;
UFUNCTION(BlueprintCallable, Category = "Login")
void AttemptLogin();
private:
UFUNCTION()
void OnLoginComplete(bool bSuccess, const FString& UserId, const FString& Error);
UPROPERTY()
UOnlineSubsystemBlueprintable* OnlineSubsystem;
};
Source/YourGame/LoginManager.cpp
#include "LoginManager.h"
ALoginManager::ALoginManager()
{
PrimaryActorTick.bCanEverTick = false;
}
void ALoginManager::BeginPlay()
{
Super::BeginPlay();
// Initialize the online subsystem
OnlineSubsystem = UOnlineSubsystemBlueprintable::Get();
if (OnlineSubsystem && OnlineSubsystem->Initialize())
{
UE_LOG(LogTemp, Log, TEXT("Online Subsystem Ready!"));
}
else
{
UE_LOG(LogTemp, Error, TEXT("Failed to initialize Online Subsystem"));
}
}
void ALoginManager::AttemptLogin()
{
if (!OnlineSubsystem)
{
UE_LOG(LogTemp, Error, TEXT("Online Subsystem not available"));
return;
}
// Bind the completion delegate
OnlineSubsystem->OnLoginComplete.AddDynamic(this, &ALoginManager::OnLoginComplete);
// Start login process
OnlineSubsystem->LoginWithPlatformCredentials();
}
void ALoginManager::OnLoginComplete(bool bSuccess, const FString& UserId, const FString& Error)
{
if (bSuccess)
{
UE_LOG(LogTemp, Log, TEXT("Logged in as: %s"), *UserId);
}
else
{
UE_LOG(LogTemp, Error, TEXT("Login failed: %s"), *Error);
}
// Unbind to avoid duplicate calls
OnlineSubsystem->OnLoginComplete.RemoveDynamic(this, &ALoginManager::OnLoginComplete);
}

Compile and Test

  1. Save all files
  2. Compile the project (Ctrl+Shift+B or Build in your IDE)
  3. Create a Blueprint subclass or place the C++ actor in your level
  4. Press Play to test

Common Patterns

Async Operations

Most gameDNA plugin functions are asynchronous. Always bind to completion delegates:

Call Async Function
→ Bind Event to "On Complete"
→ Handle Success/Failure in bound event

Error Handling

Always handle potential errors:

Call Function
→ Branch on "Is Valid" output
→ True path: Continue with operation
→ False path: Show error to user / Log error

Configuration at Runtime

Many plugins support runtime configuration:

// Get plugin settings
UOnlineSubsystemBlueprintableSettings* Settings =
GetMutableDefault<UOnlineSubsystemBlueprintableSettings>();
// Modify settings
Settings->DefaultSubsystem = "Steam";
Settings->bAutoLogin = true;
Settings->SaveConfig();

Testing Your Implementation

Debug Mode

Enable verbose logging in Project Settings:

  1. Go to Edit → Project Settings → Plugins → gameDNA [Plugin Name]
  2. Enable “Debug Mode” or “Verbose Logging”
  3. Check Output Log for detailed information

Simulation Mode

Most plugins support a simulation/mock mode for testing without live services:

In Project Settings, enable “Use Mock Backend” under the plugin settings.

Next Steps

You’ve completed the quick start! Here’s where to go next: