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.
-
Open Your Project
Launch Unreal Editor with your project that has the plugin installed.
-
Verify Plugin is Active
Go to Edit → Project Settings → Plugins → gameDNA and confirm your license is active.
-
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.
-
Create a New Blueprint
Right-click in Content Browser → Blueprint Class → Actor → Name it
BP_LoginManager -
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" -
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 -
Place in Level
Drag
BP_LoginManagerinto 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:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystemBlueprintable" // Add gameDNA plugin});Create Login Manager Class
#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;};#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
- Save all files
- Compile the project (Ctrl+Shift+B or Build in your IDE)
- Create a Blueprint subclass or place the C++ actor in your level
- 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// Bind before callingPlugin->OnOperationComplete.AddDynamic(this, &AMyClass::HandleComplete);Plugin->DoAsyncOperation();
// In your handlervoid AMyClass::HandleComplete(bool bSuccess){ // Handle result Plugin->OnOperationComplete.RemoveDynamic(this, &AMyClass::HandleComplete);}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 errorif (!Plugin || !Plugin->IsInitialized()){ UE_LOG(LogYourGame, Error, TEXT("Plugin not available")); return;}
FOnOperationComplete Callback;Callback.BindLambda([](bool bSuccess, const FString& Error){ if (!bSuccess) { UE_LOG(LogYourGame, Error, TEXT("Operation failed: %s"), *Error); }});
Plugin->DoOperation(Callback);Configuration at Runtime
Many plugins support runtime configuration:
// Get plugin settingsUOnlineSubsystemBlueprintableSettings* Settings = GetMutableDefault<UOnlineSubsystemBlueprintableSettings>();
// Modify settingsSettings->DefaultSubsystem = "Steam";Settings->bAutoLogin = true;Settings->SaveConfig();Testing Your Implementation
Debug Mode
Enable verbose logging in Project Settings:
- Go to Edit → Project Settings → Plugins → gameDNA [Plugin Name]
- Enable “Debug Mode” or “Verbose Logging”
- 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.
#if WITH_EDITORPlugin->SetUseMockBackend(true);#endifNext Steps
You’ve completed the quick start! Here’s where to go next:
- Licensing Guide - Understand license types and team features
- Plugin Documentation - Deep dive into your specific plugin
- API Reference - Learn about programmatic license validation
- FAQ - Common questions answered
- Discord Community - Get help from other developers