Using SDK
Create Ad Surfaces and Branded Object Placements in your Unreal Engine project.
Last updated
Create Ad Surfaces and Branded Object Placements in your Unreal Engine project.
Last updated
Once the Rene SDK is successfully installed and opened, you can start utilizing its features. If you have correctly added the API Credentials generated for your game on the ReneVerse Portal into the ReneVerse API Editor menu in Unreal Engine Editor, you can click Sync Data. Once successfully synced through your API keys with the ReneVerse Portal, you'll see foldouts for Ad Surfaces List and Branded Object List, which you had created and configured on the portal.
When you unfold Ad Surfaces List or Branded Object List, you will see list of ads that you have added trough the portal. Information about them are displayed on their respective cards.
Once you have chosen surface or branded object you want to place, for Ad Surfaces select type you want to place and simply click Create Ad Surface, or click Create Branded Object Placement button. Actor will be placed in the scene.
Once the any type of Ad Surface has been placed in the scene you can rescale it and place it in a position you would like it to be. You can group surfaces, parent them or ad them as an child actors in scene.
Plane Banner Ads are flat 2D objects you can place on any flat surface. Keep their position and orientation in mind.
Decal Banner Ads use Decal Component to draw 2D ads on your prefered surface.
Same routine can be done with branded objects. Find object placement in the ReneVerse API Editor and click Create Branded Object Placement.
From there you cans scale actor itself or edit bounds of Target Bounding Box until it fits in your scene. When served, object will fit inside bounding box.
Once served, 3D object will be created and rescaled to fit the bounds you have setup.
Once you have setup ad surfaces and object placements, it is easy to serve them any time during the games runtime.
Serving from blueprint
Simplest way to serve ads in your game is by calling one of functions in ReneAPISubsystem. For batch serving ads in your scene, in case you want to serve all ads you can call:
ServeAllAds - it will serve and populate all ad surface and branded objects in your scene
ServeAdSurfaces - it will serve all ad surfaces in scene
ServeBrandedObjects - it will serve all branded objects in scene
For more control, you can call ServeAd or ServeBrandedObject if you want to serve only one of the ads. Simply pass AdSurfaceId or BrandedObjectPlacementId to it. The rest of the parameters are optional.
If you want to target individual ads and serve them separately, you can always use two options: 1. use ServeAd or ServeBrandedObject functions and target specific ids directly in subsystem; 2. get individual reference of the actor and call ServeAd
Serving ads from c++
In order to use ReneVerseSDK from c++, you will need to include ReneVerseSDK as module in your .Build.cs.
To serve ads from your code, the procedure stays the same as with blueprints. You have access to all methods that you need from blueprints. Simply get ReneAPISubsystem and call one of the corresponding methods that suits your needs.
Another option is to call ServeAd on each individual ad,
To stop serving ads in your scene you can always call StopServingAllAds function in ReneAPISubsystem either from Blueprint or c++.
To enable your player to connect to ReneVerse portal you can call Login function in ReneAPISubsystem from blueprint or c++ and pass their email and password they have provided have entered from login form or other means.
As mentioned before, when syncing data from the editor after entering credentials, ReneVerse folder has been added to your project. It contains data asset and data tables with data for your game ads.
Keep the folder in the root of you Content folder.
Once created from the editor, every Ad Surface or Branded Object have reference to the corresponding data table.
In case that your workflow requires that you need to make some modifications to the one of the blueprints, you can always create your custom blueprint from either BP_BannerAdSurface or BP_BrandedObjectPlacement.
Once you have done that you can select DT_AdSurfaceDataTable for surfaces or DT_BrandedObjDataTable for branded objects and select row with the ID you want to serve there.
In case that the data is missing from actors in your scene or something got corrupted, you can always try one buttonfix from ReneVerse Editor by clicking on the Update All Scene Surfaces button.
Once the ads are served, data is being collected for each ad actor you have placed in the scene. To view debug information for each object in scene you can use console command Debug.DrawTrackingData 1. Console can be accessed by clicking ~ key.
Data that will be shown for each ad actor is screen cover percentage and view angle as well as points that are checked for occlusion. This can help you position ads in a way that is most beneficial and check if anything is blocking their line of sight from the player.