Unreal Engine Integration Examples

Complete C++ examples for Unreal Engine with Blueprint support

Available Examples

Download and integrate these C++ files into your Unreal Engine project to quickly get started with the IDCGames API.

IDCGAMES_API

10.1 KB
Header

Singleton instance

IDCGamesAPIManager.h Sep 27, 2025
Download Header

Unknown Class

19.0 KB
Implementation

Initialize default values

IDCGamesAPIManager.cpp Sep 25, 2025
Download Implementation

Integration Guide

1

Download Files

Download both the header (.h) and implementation (.cpp) files

IDCGamesAPIManager.h - Header file
IDCGamesAPIManager.cpp - Implementation file
2

Add to Unreal Project

Place the files in your Unreal project's Source folder

Source/IDCGamesAPI/
Create the folder structure if it doesn't exist
3

Update Build Files

Add the new module to your project's build configuration

YourProject.Build.cs
Add "IDCGamesAPI" to PublicDependencyModuleNames
4

Use in Blueprint or C++

Access the API manager from Blueprint or C++ code

// C++ Usage
UIDCGamesAPIManager* API = UIDCGamesAPIManager::GetInstance();
API->Login();

// Blueprint Usage
// Use the "Get IDCGames API Manager" node

Code Examples

Authentication (C++)

// Login using third-party authentication
void AMyGameMode::Login()
{
    UIDCGamesAPIManager* API = UIDCGamesAPIManager::GetInstance();
    API->OnLoginComplete.AddDynamic(this, &AMyGameMode::OnLoginComplete);
    // Supported platforms: sandbox, idc, steam, epic, googleplay, applestore, playstation, nintendo
    API->Login(TEXT("sandbox"), TEXT("unique_user_id"), TEXT("PlayerName"));
}

// Handle login response
void AMyGameMode::OnLoginComplete(bool bSuccess)
{
    if (bSuccess) {
        UE_LOG(LogTemp, Log, TEXT("Login successful!"));
        // Tokens are automatically saved
    }
}

// Refresh token when needed
void AMyGameMode::RefreshToken()
{
    UIDCGamesAPIManager* API = UIDCGamesAPIManager::GetInstance();
    API->RefreshToken();
}

Shop Integration (C++)

// Get shop items
void AMyGameMode::GetShopItems()
{
    UIDCGamesAPIManager* API = UIDCGamesAPIManager::GetInstance();
    API->GetShopItems();
    // Results will be available through events
}

// Buy shop item
void AMyGameMode::BuyItem(int32 ItemId, int32 Quantity)
{
    UIDCGamesAPIManager* API = UIDCGamesAPIManager::GetInstance();
    API->BuyShopItem(ItemId, Quantity);
    // Success/failure will be available through events
}

Stats Submission (C++)

// Submit game statistics
void AMyGameMode::SubmitGameStats()
{
    UIDCGamesAPIManager* API = UIDCGamesAPIManager::GetInstance();
    
    TMap SessionStats;
    SessionStats.Add(TEXT("kills"), 5);
    SessionStats.Add(TEXT("deaths"), 2);
    SessionStats.Add(TEXT("assists"), 3);
    SessionStats.Add(TEXT("wins"), 1);
    SessionStats.Add(TEXT("score"), 1500);
    
    TMap EventProgress;
    EventProgress.Add(TEXT("event_1"), 10);
    EventProgress.Add(TEXT("event_2"), 5);
    
    API->SubmitGameStats(SessionStats, EventProgress);
}

Blueprint Integration

Available Blueprint Nodes

Authentication:

  • • Get IDCGames API Manager - Get singleton instance
  • • Login - Third-party authentication
  • • Refresh Token - Renew access token
  • • Validate Token - Check token validity

API Calls:

  • • Get User Stats - Retrieve player statistics
  • • Submit Game Stats - Send game data
  • • Get Shop Items - Browse shop
  • • Buy Shop Item - Purchase items

Blueprint Events

Authentication Events:

  • • On Login Complete - Login success/failure
  • • On Error - Error messages
  • • On User Data Updated - User info updates

Data Events:

  • • On Stats Received - Stats data available
  • • On Shop Items Received - Shop data available
  • • On Inventory Updated - Inventory changes

Features

Core Features

  • • Singleton Pattern: Easy access from anywhere
  • • Blueprint Support: Full Blueprint integration
  • • Event System: Blueprint-friendly events
  • • Auto Token Management: Automatic refresh
  • • JSON Parsing: Automatic response parsing

API Support

  • • Authentication: Login, refresh, validate
  • • Shop System: Browse, buy, inventory
  • • Stats System: Submit and retrieve
  • • Rewards System: Daily rewards
  • • User Management: Profile updates