Unreal Engine 4 SDK

This guide will take you through the steps of setting up the Unreal Engine 4 SDK.

This guide assumes:

Editor Setup

1. Install Plugin

Plugins

Our plugin is pre-compiled with source code removed.

We currently support version 4.23.

Download

Download and unzip the Frameplay plugin folder.

Install to project

  • Go to your project folder which contains the file [ProjectName].uproject
  • Create a folder called Plugins
  • Copy the Frameplay folder into the Plugins folder

Install to engine
  • Go to the Unreal Engine Plugins folder ~Epic Games > Engine > UE_4.xx > Plugins
  • Copy the Frameplay folder into the Plugins folder

Installing to engine is required for running your project in the DebugGame configuration.

The BuildId in Frameplay > Binaries > Win64 > UE4Editor.modules must match your current.

2. Setup Data Asset

Data Asset

The Frameplay Data Asset is an asset used to maintain the link between your UE4 project and the Developer Dashboard.

1. Create a Frameplay Data Asset using the Content Browser. Add new < Frameplay < Data Asset

2. Set the Developer API Key and Game ID with the appropriate values. These are found on the Games Page on the Frameplay Platform.

3. In Project Settings navigate to Plugins > Frameplay and select your newly created Data Asset.

3. Create an Ad Space

Actors

What is an Ad Space? An Ad Space is a UE4 Actor that displays targeted advertisements to the player.

In World

Inside of the Modes panel and Place tab, drag and drop the Frameplay Ad Space Actor into the Viewport.

The Ad Space Debug Text is displayed red to signal that it is unregistered.

Blueprint

Create a new AdSpace Blueprint class using the Content Browser. Add new < Frameplay < AdSpace Blueprint

4. Register an Ad Space

Ad Spaces must be registered to link with the Frameplay servers. This allows advertisements to be requested and loaded at runtime. When playing in Editor, a Development Build or in Test Mode, placeholder advertisements will be used. When playing in a Shipping Build real advertisements will load, enabling metrics gathering and monetization.

1. Select the newly created Unregistered Ad Space from the World Outliner or Viewport.

2. Modify the Ad Space data if required, in the Details Window under the Frameplay category.

It's good practice to fill out the description, this will help identify Ad Spaces later on. More information about Ad Space Properties.

3. Click Register Ad Space.

5. Start the Frameplay Session

Blueperints, C++, Cameras

What is a Frameplay Session? A Session is a run-time connection to the Frameplay servers.

Once a Session is started, Ad Spaces can request and load advertisements in game.

Note that the session should be started when a player begins your game. For example during your loading sequence. The session is automatically shutdown when a player quits the application.

1. Begin by calling Frameplay.StartSession().

2. Register a Camera.

Click for Blueprint Example

Click for C++ Example
#include "TestActor.h"
#include "FrameplayManager.h"
#include "Kismet/GameplayStatics.h"

// Sets default values
ATestActor::ATestActor()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

}

// Called when the game starts or when spawned
void ATestActor::BeginPlay()
{
	Super::BeginPlay();

	UFrameplayManager::StartSession(this, FPDataAsset, 18, FPlayerSex::Male, "newPlayer,", "en");

	auto cam = UGameplayStatics::GetPlayerCameraManager(this, 0);

	UFrameplayManager::RegisterCameraManager(cam);
}

Parameters

  • Frameplay Data Asset Reference (Required)
  • Player information (Optional)

The Frameplay Session requires knowledge of a Camera to use for gathering metrics and triggering advertisements.
Only one camera can be registered at a time.
Cameras can be registered and unregistered when required.

More information on the Frameplay API.

Packaging a Shipping Build

Packaging Projects

For full functionality, your developer account and game must have passed through the Frameplay approval process. The current wait time for game approval is 48 hours. You can continue with these steps before the approval process has been completed however only mock advertisements will load during run-time and no advertisements will load in Shipping builds.

When you are ready to build a Shipping version of your project, uncheck the Test Mode checkbox in the Frameplay Data Asset. This will allow Ad Spaces to request and load real revenue raising advertisements. More information

Last Updated: 11/7/2019, 5:53:46 AM