đŸ“ĻSDK Tutorial

Step by step guide for importing and using Renovi SDK.

Package Structure

The Renovi package is organized into the following folders, each serving a specific purpose:

Download

Contains essential packages utilized within Renovi:

  • DOTween for Animations: Provides optimized animations compared to Unity's animation system.

  • Starter Assets: Unity package featuring a first-person controller for initial project setup.

Materials

Houses shaders and materials catering to different project lighting settings:

  • Lit Shader: Designed for projects utilizing lighting, URP, and HDRP settings, accompanied by materials for testing purposes.

  • Unlit Shader: Ideal for projects with no lighting settings, accompanied by materials suitable for testing.

Models

Provides a generic poster model for testing purposes. Developers are encouraged to replace it with their own models if desired.

Prefabs

Offers pre-configured prefabs using both lit and unlit shaders, along with materials. These prefabs are organized and separated for ease of use with the SDK Manager script.

Resources

Contains essential resources such as LocalData for offline game functionality and standard images.

Scenes

Includes the Playground scene from starter assets for testing purposes. While not configured for URP or HDRP, it seamlessly integrates upon import.

Scripts

  • Essential scripts powering Renovi's functionalities:

    • ADCamera: Tracks players' visibility of ads and handles ad visibility changes.

    • ADAnimation: Facilitates panel animation when ads are updated.

    • ADObject: Placed on panels designated for displaying ads.

    • SDKManager: Central script responsible for server connectivity, data retrieval, token management, data loading, tracking, and sending data back to the server.

Sprites

Features sprites of various resolutions for testing purposes, including 1x1, 2x1, and 1x2 resolutions. Additionally, it includes a banner with images for ads requiring visuals.

Dependencies

The Renovi project relies on the following dependencies:

  • DOTween Package: Utilized for smooth and optimized panel animations within the platform.

Build and Deployment

Renovi's build and deployment process require no specific settings. You can seamlessly deploy your project without any additional configurations.

Asset Pipeline

Renovi's asset pipeline revolves around the usage of two essential packages:

  • DOTween: Enhances panel animations for a more engaging user experience.

  • Unity Starter Assets FPS: Provides foundational assets for implementing a first-person perspective within your project.

Tutorials and Examples

Renovi offers tutorials and examples to streamline your development process:

  • Quick Test: Follow these steps for a quick test of Renovi's capabilities:

    1. Open the "Playground" scene located in the "SDK" folder within the "Scenes" directory.

    2. In the SDKManager script, populate the required information for login and game ID to simulate a real-world scenario.

  • In the SDKManager script, populate the required information for login and game ID to simulate a real-world scenario.

Add Package to Your Project:

  • Import the Renovi package into your Unity project.

  • Note: You can relocate the package folder without affecting functionality.

Explore Prefabs:

  • Navigate to the "Prefabs" folder within the package.

  • You'll find two subfolders: one with prefabs using a lit shader and the other with prefabs using an unlit shader.

  • Simply drag and drop your desired prefabs into the scene.

Configure SDKManager Script:

  • Locate the object named "SDKManager" in your scene hierarchy.

  • Access the SDKManager script attached to this object.

  • Input your email, password for the studio, and game ID to establish a connection with the API server.

Configure Panel Objects:

  • Within the child object named "Panels" under SDKManager, find the ADObject script.

  • Input the panel ID obtained from your profile where you created these panels.

Ensure Proper Tagging:

  • Verify that every panel in your scene has a tag set to "AD-Panel" for proper identification.

Configure Main Camera:

  • Attach the AdCamera script to your main camera to track ad visibility.

Custom Setup

  • For a customized setup tailored to your project's needs, follow these steps:

    1. Add SDKManager Script: Place the SDKManager script in your scene and populate it with the required information.

    2. Create Panels: Design panels using built-in models or custom models. Ensure each panel has the ADObject and ADAnimation scripts attached. Additionally, add a collider and tag them with "AD-Panel". You can utilize one of the Lit or Unlit prefabs from the Prefabs folder for convenience. Note that panels do not need to be children of the SDKManager object.

    3. Configure ADAnimation: For ADAnimation, arrange two panels as children of the object to switch positions for animation. Customize these scripts to enhance animation effects.

    4. Add ADCamera Script: Attach the ADCamera script to your camera to track ad visibility.

    Now you're ready to test your custom setup!

Troubleshooting and FAQ

Encountering issues? Here are some common troubleshooting tips:

  • Null Tag Error: If you receive an error regarding a null or unset tag, ensure you've added the "AD-Panel" tag to the panels and checked all panels used for displaying ads to have this tag.

  • Duplicate Conflicts: Check for duplicate conflicts by verifying if you've already downloaded the following packages:

    • Unity Starter Assets First-Person

    • DoTween Ensure these packages are up-to-date to avoid conflicts.

If you encounter any difficulties, refer to the "Playground" scene in the SDK folder for comparison with settings and configurations.

Feel free to reach out for further assistance or clarification!

Now, go ahead and test your setup with confidence!

Last updated