Getting Started

Last updated: May 13th, 2019

Introduction

CrossProm is a great drag and drop tool to promote your own games! It works just like the regular advertisements, but instead drives traffic to your own games. With developers and players in mind, we have made this tool to be easy to implement, easy to configure and pleasant experience for end users as well.


Features:

  • Drag and drop solution.

  • Custom Editor - No reason to hassle with data files, we allow you to work from already familiar environment.

  • Easy to customize! Starting from UI customization, to the way tool works, we offer them all. Do you want to change the UI? Feel free to, do you want to sync more data? Feel free to do so. We even let you customize which parts of the tool can work and which can't.

  • Cross Platform support - Yeah, we support all the platforms....

  • Updates without republish! That's one of the main points of this tool. All the changes are synced to players without any app update. We pushed this even further and we even offer importing data into Unity itself, which means you won't have to setup same games over and over. They will be already set up in your next project!

  • Support for multiple games! Add as many games as you like...

  • There are a lot more features available, such as Weight System based random, (you can assign chances to each game), offline mode, automatic ad show, local images, and more.

JSON.NET is required!

JSON.NET is required to use our package. Please download and import free package from Here!

Setting Up

Locating Options File

Now that you have downloaded your shiny new package, what do you do next? Well, that would be configuaration and this is how it works.

Configuration file is called CrossProm Configuration. Navigate to Assets/Hagrid's Tools/CrossProm then, right click and press Create/CrossProm Options. CrossProm Configuration file should have now been created.

Configuring Options

After locating the configuration file, please configure it. Here is what each field does.

New game can be added by increasing number in Promo Games List

  • Update URL - Link for Json file.
  • Promo Games List - List of all games.
    • Name - Name of the game.
    • Description - Description of the game
    • Android URL - URL to download game on Android.
    • IOS URL - URL to download game on IOS.
    • Package ID - Bundle ID for the game
    • Image URL - URL for Icon. (PNG, JPG, JPEG)
    • Color Theme - HEX Color code, to customize frame of the ad.
    • Chance Weight - Games with higher weight, will have higher chance to show up more often
  • Buttons
    • Export Data - Exports currently filled data.
    • Fetch data from network - Imports Json from Update URL. Overwrites Promo Games List with data from Json.
    • Fetch data from local JSON - Imports local Json file. Overwrites Promo Games List with data from Json.
    • Fetch Images - Downloads all images from Image URLs of Promo Games List. Names them accordingly to game names.
    • Log probability - Takes all Chance Weights, and tells you show rate for each game in percentages

Info:

1) You can revert changes by using CTRL+Z (or Command + Z on Mac)
2) Description, Color Theme, Chance Weight - are optional fields, and can be left blank

Warning:

Name field is also used to generate some files in the back. Please avoid using any of the character's that can't be used for a file name. Otherwise it won't work.

Local Game Icons

CrossProm allows you to ship game icons within the game. This saves users from downloading icons on their first launch.

  1. Make sure icon names' and game names' that you configured in CrossProm match!
  2. Import all the icons into any Resources folder in Unity
  3. Disable texture compression
  4. Enable Read/Write option
  5. You're now set!

Info:

If you already have image URLs set up in CrossProm Configuration, you can just use Fetch Images button and instantly get all of your game icons. If you do this, naming will also be taken care of. This only skips step one, please follow other steps of importing textures!

Can I skip this?

If you aren't using Offline version of CrossProm, you can skip this, however it is recommended to ship icons within the game, so players can have all of your game ads, as soon as they download the game.

CrossProm Controller

Now that everything's configured, we need to tell CrossProm Controller, how to process all these data.

CrossProm Controller takes care of UI output as well. By default, CrossProm comes with 3 different prefabs, CrossPromController, CrossPromController_Landscape and CrossPromController_Portrait

CrossPromController is for those, who would like to use their own UI. Other prefabs come with our UI, for LandScape and Portrait views. Please use one that suits you.

Locate version of CrossPromController Prefab at Assets/Hagrid's Tools/CrossProm/Prefabs and feel free to drag and drop it into your very first scene in build settings (Main Menu scene by default).

Now configure it:

  • Disabled - Disables the CrossProm.
  • Disable Auto Show - Disables Auto Show feature. If you disable auto show, you will need to manually request a new ad within a script.
  • Offline Mode - Disables updating option (useful if you can't host JSON file).
  • Weighted Random - If enabled, you will be able to controll which ads to show more often.
  • Filter Installed Games - If enabled, CrossProm won't show ads for already installed games. (Android only)
  • Options Asset - CrossProm Configuration should be selected here.
  • Timer Duration - Timer for ad to show up (in seconds). X - Minimum value, Y - Maximum Value
  • Update Frequency - How often should CrossProm update its data. (Value is for days. 0 if you want CrossProm to update data on every single launch)
  • Game Ad Duration - This is timer on how long ad stays active.
  • Ad Game Object - Parent object of whole game ad object should be selected here. It sets active that object.
  • Title - This is output for Text canvas (outputs game's name)
  • Description - Output for Text canvas (outputs game's description)
  • Image - This is output for Image canvas (outputs game's icon)
  • Colorable Images - All images in this list will be colored to Color Theme from Configuration

Canvas Fields

All Canvas output fields are optional. So you can output only what you like. You won't get any Null Reference exception, by leaving these fields empty.

Showing Ad

Once everything is setup, you can show ad by calling InvokeNewAd() function. If you have Auto Ad Show disabled, you will need to call this function, every time you would like to show ads. Otherwise, ads will continue to show up after calling this function once.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HagridsTools.CrossProm; //Don't forget to include this

public class DemoController : MonoBehaviour
{
    void Start()
    {
        if (CrossPromController.instance != null)
        {
            CrossPromController.instance.InvokeNewAd();
        }
    }
}

For advanced users

Instantly Showing Ad

If you are using the Auto Ad Show, but also want to pop out an ad at specific times, you can force ad to show from the script. Please see the example down below.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HagridsTools.CrossProm; //Don't forget to include this

public class DemoController : MonoBehaviour
{
    void Start()
    {
        if (CrossPromController.instance != null)
        {
            CrossPromController.instance.InvokeNewAd(true);
        }
    }
}

Disabling CrossProm

If you would like to disable CrossProm (maybe player bought No Ads, or whatever the reason may be), you can use following function:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HagridsTools.CrossProm; //Don't forget to include this

public class DemoController : MonoBehaviour
{
    void Start()
    {
        if (CrossPromController.instance != null)
        {
            CrossPromController.instance.DisableCrossProm();
        }
    }
}

Remember:

After calling this, CrossProm is ONLY disabled from the current play session. You'll need to create custom If statement, that'll disable CrossProm on next launch.

GameAd Structure

GameAd is the main class, that holds information on the game. Here are all of its parameters.

public class GameAd
{
    public string m_Name;
    public string m_Descirption;
    public string m_AndroidUrl;
    public string m_IOSUrl;
    public string m_PackageID;
    public string m_ImageUrl;
    public string m_ColorTheme;
    public AdWeight m_Probability;
}

Callbacks

CrossProm does offer Callbacks for following events: AdShow, Download Button Clicked, Ad Exited

To receive Callbacks, please subscribe to events as in the example down below

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HagridsTools.CrossProm; //Don't forget to use this

public class DemoController : MonoBehaviour
{
    void Start()
    {
        if (CrossPromController.instance != null)
        {
            CrossPromController.instance.InvokeNewAd(); //This can be ignored, this is from previous script

            CrossPromController.instance.Event_OnAdShow += TempEventShow;
            CrossPromController.instance.Event_OnAdDownload += TempEventDownloadClick;
            CrossPromController.instance.Event_OnAdQuit += TempEventQuit;
        }
    }

    void TempEventShow(GameAd _Game)
    {
        //Do Something Here
        Debug.Log("Showed ad for " + _Game.m_Name);
    }

    void TempEventDownloadClick(GameAd _Game)
    {
        //Do Something Here
        Debug.Log("Download clicked on " + _Game.m_Name);
    }

    void TempEventQuit(GameAd _Game)
    {
        //Do Something here
        Debug.Log("Ad quit for " + _Game.m_Name);
    }
}

Thank you for choosing CrossProm!
Liked it? Or was it really bad experience?

In any case we really want to know your feedback. If it was awesome, feel free to rate us on Asset Store.
If you encoutered problems, please email us at support@wildskullgames.com


Like what you see? then consider donation! Many Thanks!