# Using the UE SDK

Once the SDK is installed and synced, you can begin placing Smart Ads and Branded Objects in your Unreal scenes—then serve them during gameplay using Blueprint or C++.

***

### 🔄 Syncing Your Game Data

Open **`Window` → `ReneVerse API Editor`** in Unreal.

1. Enter your **API Key** and **Private Key** from the Portal.
2. Click **`Sync Data`**.

You’ll now see foldouts for:

* **Ad Surfaces List**
* **Branded Object List**

Each entry includes metadata (e.g., ad type, ID) and a button to **`Add to Scene`**.

> 🗂️ A `ReneVerse` folder will be added to your Content directory, including data assets and data tables. Keep this folder in the root.

<div><figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FzL7FobBlfnRx2Qu1hnew%2Fshow_surfaces.png?alt=media&#x26;token=1fb3c52e-b321-4c7b-866e-3987453f87e6" alt=""><figcaption><p>Ad Surface Data</p></figcaption></figure> <figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FhxgwiUANoMokWBDYZHNk%2Fshow_bo.png?alt=media&#x26;token=1d12e754-81b9-4f8d-9f53-0e99308e5f69" alt=""><figcaption><p>Branded Object Placement Data</p></figcaption></figure></div>

***

### :frame\_photo: Placing Ad Surfaces

After selecting an Ad Surface from the list:

* Click **Add to Scene**.
* You can reposition, group, parent, or scale it like any other actor.
* **Types:**
  * **Plane Banner Ad** – A flat 2D surface.
  * **Decal Banner Ad** – Projects onto geometry using a Decal Component.

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FfS4ud6ENssBghAkuXaMu%2Fadinscene.png?alt=media&#x26;token=baf7d22b-1ec8-42df-8e55-9b211fd4d369" alt=""><figcaption><p>Ad Surfaces: Planes &#x26; Decals</p></figcaption></figure>

***

### :game\_die: Placing Branded Objects

Click **Add to Scene** on a Branded Object entry. You can:

* Move or scale the actor.
* Adjust the bounding box to define the object’s space.

When served, a 3D object will be loaded and scaled to fit the bounds.

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FLDEyIYf3QcRegNGOarVO%2Fimage.png?alt=media&#x26;token=c8b200f0-c4fc-4d8c-8f70-97781b18b84b" alt=""><figcaption><p>Branded Object Placeholders</p></figcaption></figure>

***

### ⚙️ Serving Ads at Runtime

Once you have setup ad surfaces and object placements, it is easy to serve them at any point during the game's runtime.

#### 🧩 Serving from Blueprint

There are multiple functions in **ReneAPISubsystem** that allow you to serve ads.&#x20;

To **batch-serve** **ads** in your scene, you can call:

* `ServeAllAds()` — Serve and populate all Ad Surfaces and Branded Objects in your scene.
* `ServeAdSurfaces()` — Serve all Ad Surfaces in scene.
* `ServeBrandedObjects()` — Serve all Branded Objects in scene.

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FqFfSPsmxlZP0QpdTzh4d%2FBPServeAll.png?alt=media&#x26;token=75949a98-6613-45dd-b7eb-f161546389fe" alt=""><figcaption><p>Serve all ads (Ad Surfaces &#x26; Branded Objects) in the scene.</p></figcaption></figure>

For granular control, you can **serve a single ad**, simply by passing the **AdSurfaceId** or **BrandedObjectId** to it. Other parameters are optional:

* `ServeAd(id)` — Serve a specific Ad Surface in scene.
* `ServeBrandedObject(id)` — Serve a specific Branded Object in scene.

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FQOpNLKsAAkas6f1X32pV%2FServeTargeted.png?alt=media&#x26;token=ca8a98ae-b54d-4cbd-b2fd-ce1f639621c4" alt=""><figcaption><p>Serve ad by ID</p></figcaption></figure>

You can also get a reference to the actor and call `ServeAd()`.

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2F7OXNWliJEzeOVPLuoOkp%2FServeIndividual.png?alt=media&#x26;token=4bc28d3c-5b5d-49ec-a7d7-cf4b625e3564" alt=""><figcaption><p>Serve ads referenced in your blueprint</p></figcaption></figure>

***

#### :computer: **Serving from C++**

To use the ReneVerse SDK from C++, add **`ReneVerseSDK`** as a module to your **`.Build.cs`** file. Then:

```
using UnrealBuildTool;

public class YourAwesomeGame: ModuleRules
{
	public YourAwesomeGame(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

		PublicDependencyModuleNames.AddRange(
			new string[]
			{
				"Core", 
				"CoreUObject", 
				"Engine", 
				"InputCore", 
				"EnhancedInput", 
				"ReneVerseSDK" // <--- add ReneVerseSDK to your moddules
			});
	}
}
```

Just like with blueprints, you can serve ads from your code with all the same functionality. Simple get **ReneAPISubsystem** and call the function that suits your needs:

Batch-serving

* `ServeAllAds()` — Serve and populate all Ad Surfaces and Branded Objects in your scene.
* `ServeAdSurfaces()` — Serve all Ad Surfaces in scene.
* `ServeBrandedObjects()` — Serve all Branded Objects in scene.

Single Serving

* `ServeAd(id)` — Serve a specific Ad Surface in scene.
* `ServeBrandedObject(id)` — Serve a specific Branded Object in scene.

Or, as mentioned above, reference your desired actor and call  **`ServeAd`**:

```
// don't forget to include header
#include "ReneAPISubsystem.h"

UReneAPISubsystem* ReneAPISubsystem = Cast<UReneAPISubsystem>(GetWorld()->GetGameInstance());
if (ReneAPISubsystem)
{
	// serve all ads in the scene
	ReneAPISubsystem->ServeAllAds();

	//serve all ad surfaces
	ReneAPISubsystem->ServeAdSurfaces();

	// serve all branded objects
	ReneAPISubsystem->ServeBrandedObjects();

	// serve one ad surface
	FString AdSurfaceID;
	ReneAPISubsystem->ServeAd(AdSurfaceID, "", "", "");

	// serve one branded object
	FString BrandedObjectPlacementID;
	ReneAPISubsystem->ServeBrandedObject(BrandedObjectPlacementID, "", "");

	// serving individual referenced ads
	ABrandedObjectPlacement* BrandedObjectPlacement;
	BrandedObjectPlacement->ServeAd();

	APlaneBannerAd* PlaneBannerAd;
	PlaneBannerAd->ServeAd();

	ADecalBannerAd* DecalBannerAd;
	DecalBannerAd->ServeAd();
}
```

***

#### :octagonal\_sign: Stop Serving Ads

To stop serving ads,  call **`StopServingAllAds` — This works for Blueprint and C++.**

**Blueprint**

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FBTPGULczNEsEioqfk5EM%2FStopServingAds.png?alt=media&#x26;token=3490f99e-a4b0-49bb-abc3-074d6fa8dded" alt=""><figcaption><p>Stop Serving Ads via Blueprint</p></figcaption></figure>

**C++**

```

// stop serving
ReneAPI->StopServingAllAds();
	
// stop individual ads
BrandedObjectPlacement->StopServingAd();
PlaneBannerAd->StopServingAd();
DecalBannerAd->StopServingAd();

```

***

### :bust\_in\_silhouette: ReneVerse Player Log-In

You can also allow players of your game to connect their ReneVerse account, made in the Portal.

Use `Login(email, password)` from Blueprint or C++ to authenticate your player with ReneVerse services.

**Blueprint**

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FnLKyFnAnQqs7z8HaFVUE%2Fimage.png?alt=media&#x26;token=0b9ef2bd-9866-41f1-99eb-e79ebb13c549" alt=""><figcaption><p>Player Authentication via Blueprint</p></figcaption></figure>

**C++**

```
ReneAPISubsystem->Login(Username, Password);
```

***

### 🎨 Working with Blueprints & Data Tables

As mentioned before, after your enter your API credentials, your project will have a new `ReneVerse` folder that should be kept in the root of your `Content` folder.

Within it, you'll have `ReneAPIData` and `Data Tables` where every Ad Surface and Branded Object created within the editor will be referenced.

* `DT_AdSurfaceDataTable`
* `DT_BrandedObjDataTable`

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FG3vt71xZXfCoL7i73G3G%2Fimage.png?alt=media&#x26;token=7f279436-677a-4982-8b4b-0b901dce5ee5" alt=""><figcaption><p>ReneVerse Folder in Content Directory</p></figcaption></figure>

If you ever wish to modify a blueprint, you can create a child blueprint from `BP_BannerAdSurface` or `BP_BrandedObjectPlacement`**.**&#x20;

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FB9TbM20TnDJ5N83yDc84%2FAdData.png?alt=media&#x26;token=189eb579-6b07-47f7-a741-ad1e0129aed1" alt=""><figcaption></figcaption></figure>

Once created, simply select the Data Table you need — `DT_AdSurfaceDataTable` for Ad Surfaces or `DT_BrandedObjDataTable` for Branded Objects. Then select the row containing the Ad Surface or Branded Object ID you wish to serve.

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FwKPHibKMZjMwj7C4yEEB%2Fimage.png?alt=media&#x26;token=b7b2a8aa-d14a-446c-8b2d-a0f5967bbb75" alt=""><figcaption><p>Select your Data Table and then the Ad Surface or Branded Object ID.</p></figcaption></figure>

***

### 🧹 Cleanup & Repair

If data seems out-of-sync or corrupted:

* Click **Cleanup and Update Ads in Scene** in the ReneVerse Editor to refresh placements.

***

### 🛠️ Create, Edit, and Delete Ads from the SDK

You can manage ad assets directly from the ReneVerse Editor in Unreal, rather than having to log into the ReneVerse Portal.

#### :magic\_wand: **Create Ads in Editor**

1. Open **Window → ReneVerse API Editor** in Unreal.
2. Use **Create New Ad Surface** or **Create New Branded Object Placement**.

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FbkjEREHk0HeNm4NjfQxu%2Fcreate_buttons.png?alt=media&#x26;token=0930029d-8133-40e0-972b-03187871947f" alt="" width="375"><figcaption></figcaption></figure>

3. Then, configure the Ad Surface or Branded Object Placement as needed, and click **Submit.** Then you can add it to your scene.&#x20;

<div><figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2F7icHYt0gZmrCk47G9927%2Fcreate_surface.png?alt=media&#x26;token=a243fc9a-f26b-49c2-a3ea-e1f4a50bb51c" alt=""><figcaption><p>Create Ad Surface</p></figcaption></figure> <figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FAqTjYr9LVIoa4ty0lp5x%2Fcreate_bo.png?alt=media&#x26;token=532b3023-cdd5-4fd3-a57a-092231410911" alt=""><figcaption><p>Create Branded Object Placement</p></figcaption></figure></div>

{% hint style="info" %}
**NOTE:** *You will need internet connection for this action to execute.*
{% endhint %}

***

:writing\_hand: **Edit Ads in Editor or Details Panel**

**From the Editor**

1. In the editor, open the **Ad Surfaces List** or **Branded Object List** to find your existing ad assets.
2. Select an item → click **Edit Ad Surface** or **Edit Branded Object Placement** → update fields → **Submit**.

<div align="right"><figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2F6fMdSFIHXcwGg7SfrZa4%2FCreateDeleteAdSurface.png?alt=media&#x26;token=78593ced-6228-44e8-9405-e2edd9a77e97" alt="" width="375"><figcaption><p>Edit Ad Surface from List in Editor</p></figcaption></figure> <figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FNMSOO4aIHQgin2V639nN%2FUpdateDeleteBO.png?alt=media&#x26;token=9196d284-4b1d-4599-a2fd-54180c933cfa" alt="" width="375"><figcaption><p>Edit Branded Object Placement from List in Editor</p></figcaption></figure></div>

**From the Details Panel**

1. Select your desired Ad Surface or Branded Object Placement in scene.
2. Under **Details**, find **Edit Ad Surface** or **Edit Branded Object Placement** → update fields → **Submit**.

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FmT6wejRFRK3X6iUDmvbE%2FDetailsEdit.png?alt=media&#x26;token=d24db652-aa3b-47eb-81f5-a02d976d82e2" alt="" width="317"><figcaption><p>Edit Ad Surface or Branded Object from Details.</p></figcaption></figure>

#### :wastebasket: Delete Ads

1. Find the Ad Surface or Branded Object placement you want to remove in the ReneVerse Editor
2. Click **Delete**, confirm the action.

> ⚠️ Deleting removes all actors with that ID in the current scene. Wait for the confirmation popup to ensure success.

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FaoMYOyDHyZe6x5J6UJHI%2FConfirmDelete.png?alt=media&#x26;token=73317518-c5a3-4cc1-8012-30fa01dcee02" alt=""><figcaption><p>Double check before clicking Confirm!</p></figcaption></figure>

{% hint style="info" %}
**NOTE:** *All changes might take couple of seconds to apply, so wait for a confirmation notification to appear before continuing with other tasks.*
{% endhint %}

***

## 🌌Game Spaces

Ad surfaces and branded objects can be grouped into game spaces. This allows you to have finer control over the type of ads served for specific group of ad surfaces or branded object placements. Game spaces are not constrained by any theme and functionality, so you can use them for use that serves your use case. You can create Game space that represents entire map, sub section, certain theme etc.<br>

To create Game space you can:<br>

1. Open **Window → ReneVerse API Editor** in Unreal.
2. Click **Create New Game Space**
3. In the newly opened window, enter the name of the Game space and click **Submit**

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2Fs98yq7fxlbYQvSTaflvF%2Fcreate_gs.png?alt=media&#x26;token=89b6e45d-0e7c-4ebe-a489-3f72deb7050f" alt=""><figcaption><p>Create game space window</p></figcaption></figure>

You can see all Game spaces created for your project in the **ReneVerse API Editor.** To delete Game space, simply find space in the list and click **Delete Game Space**.

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2FDYLQMYkD0onLIBoPo0Pc%2Fshow_gs.png?alt=media&#x26;token=59570609-65cb-4204-b102-9c9826fce688" alt="" width="375"><figcaption></figcaption></figure>

You can always assign ad surface or branded object placement to one or multiple Game spaces during the creation or update process. In the create or update form, for ad surface or branded object, select one or multiple Game spaces before submitting.&#x20;

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2F5DE8O8kYU3GEm1SGZshV%2FAdd_gs.png?alt=media&#x26;token=389e9b16-f25b-4911-bf78-8a06ec4ede75" alt=""><figcaption></figcaption></figure>

***

## 🎭Emotional tagging

One of the features that allows you more control is a way to tag your ad surface or branded object, so that it signifies in what moment the ad is displayed.&#x20;

All ads when created are tagged as regular ads. But you can, during creation or when updating ad, tag them as **ENHANCED**. That means that the ad is visible during the event in your game that has higher emotional impact to the player, for example: victory in a multiplayer match, start of the boss fight, during in-game cutscene with important story reveal etc.&#x20;

<figure><img src="https://2133953908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2R0efebFfiw8qumiNT9v%2Fuploads%2Fd4hL2vvagvqz4BkidDgZ%2Femotional_tag.png?alt=media&#x26;token=004c7b5b-f998-493c-9252-dda1eca2e89f" alt=""><figcaption><p>Changing emotional tag for ad surface</p></figcaption></figure>

***

### 🧪 Ad Impression Debugging

Open Console using the `~` key. Enable debug view with the console command:

```bash
Debug.DrawTrackingData 1
```

It shows:

* Screen coverage %
* View angle
* Occlusion checks

Use this to optimize ad placement and visibility.

***

## :tools:Building the game

There is only one thing that should be taken into account during the build process of your game and that is that you should make sure that the `/Game/ReneVerse/` folder is included into a build.&#x20;

You can do that by following these steps:

* Go to `Project Settings` -> `Project` -> `Packaging`.
* Under the main `Packaging` section (you might need to click the small triangle to expand advanced settings), find:
  * **`Additional Asset Directories to Cook`** and  add the directory `/Game/ReneVerse/`
* Package your build after changing these settings.

This will make sure that the all required data assets and data tables are packaged into you project and ready to be used by ReneVerseSDK.
