Get Started

This guide will show you how to integrate the Frameplay plugin into your Unreal Engine project.

Prerequisites

See the Unreal Engine manual for more information on the Unreal Engine.

Download the Frameplay Plugin

Download and unzip the latest version of the Frameplay Unreal Engine plugin from the downloads page

Install the Frameplay Plugin

Plugins can be installed either in your project, or in the Engine itself.

Install to Project

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

Install to engine

  1. Go to the Unreal Engine Plugins folder ~Epic Games > UE_4.xx > Engine > Plugins
  2. Copy the Frameplay folder into the Plugins folder

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

See the Unreal Engine manual for more information on Plugins.

Reload Your Project

Our plugin is pre-compiled with the source code removed. This requires the BuildId to match your own.

Your BuildId can be found in an existing modules file. For example: ~Epic Games\UE_4.xx\Engine\Binaries\Win64\UE4Editor.modules

Update the BuildId property in the file Frameplay > Binaries > Win64 > UE4Editor.modules to match this.

If you require an open source version of the plugin, please email support@frameplay.gg.

Setup the Frameplay Data Asset

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

  1. Create a new Frameplay Data Asset using the Content Browser. Add new < Frameplay < Data Asset
  1. Open the new Data Asset file and set the Developer API Key and Game ID with the corresponding values found on your Game Page

3. Under Project Settings navigate to Plugins > Frameplay and select the newly created Data Asset.

See the Unreal Engine manual for more information on Data Assets.

Initialize the Frameplay SDK

Before loading Ads, have your project initialize the Frameplay SDK by calling Frameplay.StartSession() and register a Camera Component or Camera Manager. This only needs to be done once, ideally at launch.

The Frameplay Session requires knowledge of the active Camera to use for gathering metrics and triggering advertisements colliders. More information on Registered Cameras

Blueprint Example

  1. Open the Level Blueprint by clicking the Blueprints button in the Level Editor Toolbar and select Open Level Blueprint.

To search for nodes right click and begin typing

  1. Setup the flow to start a Frameplay Session on Begin Play, and register a Camera Manager

  2. Under the Start Session node, select the newly created Frameplay Data Asset

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, -1, FPlayerSex::Unknown, "newPlayer,", "en");

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

	UFrameplayManager::RegisterCameraManager(cam);
}

The Frameplay SDK is now included in your project and will be initialised at run-time. You're now ready to implement an Ad Space.

More information on the Frameplay API.

More information on the Frameplay Session & Cameras.

See the Unreal Engine manual for information on Blueprints C++ and Cameras.

Last Updated: 4/2/2020, 12:27:34 AM