Page cover

🔨[WIP] Using the Unity SDK

Create Ad Surfaces for your game in Unity using the SDK.

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 Settings menu in Unity, you can click Sync Game Assets. Once successfully synced through your API keys with the ReneVerse Portal, you'll see foldouts for Ad Surfaces and Branded Object Placements and Game spaces which you had created and configured on the portal.

Within the Ad Surfaces section or a Branded Object Placement, you'll see a list of items created in the ReneVerse Portal or directly from the editor. These include associated metadata such as AdSurfaceId, AdType, Interactivity, Emotional tag , Game spaces and TargetingTags, along with a button to Instantiate Ad Surface, Instantiate Branded Object Placement. Clicking these buttons will generate the respective entity in your Unity project, predefined and linked to the data on the portal. There are as well options to Edit or Delete Branded Object or Ad Surface from the Portal. The details of the created object will be visible in the Inspector window for easy validation against the portal configurations.

Creating, Editing and Deleteing

You can create, edit or delete branded objects or ad surfaces, without leaving your project, directly from the editor. In each list section, there is corresponding button, Create Ad Surface, Create Branded Object and Create Game Space. That will open new for for creation of that type on the Portal. Then you can simply insert required data and submit it. Project data will be updated accordingly.

Same procedure is for the editing. Just find item that you want to edit in the list, click Edit button. After changing information in the form and submitting, you are ready to continue with your workflow.

On each item there is Delete button. After accepting warning prompt, that item will be deleted from your game data.

Key Features of Ad Surfaces and Branded Object Placements

  1. Compatibility with Unity Rendering Pipelines:

    • The SDK supports both Built-in and Universal Render Pipelines. Materials for ad surfaces or branded object placements are automatically assigned based on your current graphics settings. However, you can customize these materials either in Packages/com.reneverse.services/Resources/Materials or directly on the instantiated objects to suit your project’s needs.

  2. Hierarchy Placement:

    • New ad surfaces or branded object placements are created inside the currently selected GameObject in the hierarchy. This ensures seamless integration as child objects of assets representing potential advertising spaces, such as banners, shop windows, or branded displays.

  3. Prefab Workflow:

    • Ad surfaces and branded object placements integrate with Unity's prefab system and are created as such.

  4. Inspector Configuration:

    • The instantiated objects have parameters visible in the Inspector for validation. The relative scale of these objects corresponds to the resolution set in the portal. Transform manipulations should primarily occur on the parent GameObject to avoid unintended content distortions. Also keep in mind that you should universally change the scale of ad surfaces or branded object placements to adhere to content that is going to be sent.

  5. Visual Representation:

    • In the scene, a Gizmo represents the branded object placement and a mesh represents ad surface. The front-facing side is labeled for easy identification, and the ID is displayed for quick cross-referencing with the portal. Gizmos can be toggled on or off for convenience during debugging. As per unity workflow the front facing side is Z axis.

  6. Global Ad Serving:

    • When creating globally identical ad surfaces or branded object placements. This ensures delivering the same ad content to the ad surface or branded object placement making level design more pattern driven and controllable.

  • You can duplicate existing ad surfaces, meaning that even if in your profile on the Reneverse website you have just one ad surface, in the actual game there could be thousands of them, preferably in a prefab, since it will help you to modify it within seconds on each instance, but essentially it's going to be just one ad surface with one ID.

  • Once an individual ad surface is selected and play mode is on, meaning your game is running, there will appear a button to check the advertisement, how it will look. But keep in mind that it will serve the current advertisement if there is no advertisement campaign running, meaning you have no content to receive. You will get the correspondent log for it and you can check on the website what could be the issue.

  • However, there is implemented the possibility to play rene ads on multiple of them, meaning that if you select thousands of video ad surfaces, hit play button in unity and select play ad in the inspector, the ads will be playing. The only limitation is that they should be of the same type, meaning that you can select only video ad surfaces together or only banner ad surfaces together. This happens because of the Unity editor's way of calling derived objects, and is easily handled if you search the corresponding game objects in the hierarchy and select only them. In our case, it's either video ad surfaces or banner ad surfaces, and using CTRL-A you could select all of them.

  • Once you play multiple advertisements, you could see that they are played if the ad surface corresponds to currently present content in currently running ad campaign. And this play ad button corresponds to one of the two public methods that you might be using, namely, PlayAd() and StopAd(). And once the ad is played, you can stop it afterward. For now, the video and banner are cached, meaning that if it's served once to the user, another time it will be taken from the cache, meaning that the second time serving of the ad does not count as serving. Only the first one is considered to be serving the advertisement.

Branded Object Placements

Branded object placements represent 3D models or interactive spaces within your game that can dynamically load branded content. These objects:

  • Automatically adjust to fit within designated collider bounds.

  • Support custom scaling to ensure content visibility while maintaining aspect ratios.

  • Include gradual tracking features to capture user interactions with branded content over time.

Game Spaces

Game spaces are one of the ways you can group your ad surfaces and branded object. You can group then by scene, part of the level, theme etc. There is no constraint regarding that and provides you with more flexibility. One ad surface or branded object can also belong to multiple Game spaces.

In order to assign you ad surface or object placement to Game space, you can simply add Spaces to them in the editor during creation or editing process.

Creating Game space is also straightforward. At the top of the Game spaces foldout is Create Game Space button. Clicking on it, opens up creation form. Fill in the name and submit it.

Each Game space entry has Delete This Game Space button, that allows you to delete already existing Game space.

Emotional tag

Emotional tag is a way to define you ad surface or branded object placement as a REGULAR ad placement, or ENHANCED. In case of enhanced tag, it represents ad space that will serve ad in a moment of the game that will elicit higher emotional response of the player. For example: victory during a race, during a boss fight cutscene, during a important story moment etc.

This parameter can be changed at any time in the editor during creation or edit process for ad surfaces and branded objects.

Automatic Tracking

The SDK automatically tracks user engagement with both ad surfaces and branded objects:

  • Screen Coverage: Monitors how much of the ad or branded object is visible to the user.

  • Interaction Time: Measures the duration of engagement with the content.

  • Tracking occurs lightweightly, requiring a camera tagged as MainCamera in Unity.

  • Notice how once the advertisement is served, the system automatically starts showing the current percentage of the seen ad relative to the game screen. It happens automatically and is lightweight. However, the Camera that you will be using for looking at Ads should be marked MainCamera which is default in Unity.

  • Coding is not necessary if you ticked Serve Ad On Start in the inspector of surface and you have camera tagged MainCamera (everything should start automatically). However, if you need more control over when ads are loaded, all you need to do is calling public method ServeAd() on the surfaces you want the ads to be served to (no matter which type they have). Getting reference to particular ad surfaces is up to you.

  • For letting your user to connect to ReneVerse portal to gain its benefits you can essentially use 3 methods:

1) Email & Password Login

2) Game Connect

That should be it to integrate and use the ReneVerse SDK into your game! Feel free to check Player Authentication to see how to use our SDK from the code perspective.

Last updated