Get Started

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


See the Unity website for more information on the Unity Engine.

Download the Frameplay Unity plugin

Download the latest version of the Frameplay Unity plugin from the downloads page

Import the Frameplay Unity plugin

Open your project in the Unity editor. Select Assets > Import Package > Custom Package and find the FrameplayPlugin.unitypackage file you downloaded.

Make sure all of the files are selected and click Import.

Setup the Frameplay Data Asset

The Frameplay Data Asset is a Scriptable Object and used to maintain the link between your Unity project and the Frameplay Developer Dashboard.

  1. Create a new data asset Assets > Create > Framaplay > Data Asset
  2. Locate the Frameplay Data Asset in the Project window under the path Assets/FrameplaySDK/Data/FrameplayData.uasset
  3. Select the Frameplay Data Asset and in the Inspector window set the Developer API Key and Game ID with the corresponding values found on your Game Page.
  4. Save the changes to the asset File > Save Project.

Initialize Frameplay SDK

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

The Frameplay Session requires knowledge of a Camera to use for gathering metrics and triggering advertisements colliders. If you change camera, you need to register the new Camera Object. More information on Registered Cameras

We've included a "Start Session" example script to make set up quick an easy.

  1. Select any Game Object in the Hierarchy window, we chose the Main Camera.
  2. Click Add Component in the Inspector window, search for and add the "Start Session" script.
  3. Once added, create a reference to the Main Camera and Frameplay Data Asset to the respective Data Asset and Camera public properties. Do this by either dragging the objects into their respective slots or by searching for them.

The Frameplay SDK is now included in your Unity 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 Unity manual for more information on GameObjects Scripts and Cameras.

Last Updated: 3/16/2020, 12:50:00 AM