Giter Club home page Giter Club logo

cordova-plugin-unity3d-ads's Introduction

UnityAds 2 Plugin

Cordova / PhoneGap Plugin for UnityAds ver 2.x

Contents

  1. Description
  2. Plugin Background
  3. Features
  4. Quick Start
  5. Installation
  6. Usage
  7. Methods
  8. Screenshots
  9. Credits
  10. Donations

DESCRIPTION

This Cordova / PhoneGap plugin enables the integration of Unity Ads video ads into your cordova mobile games or apps in a way that both increases player engagement and puts more money in your pocket over the gamer’s lifetime. Unity Ads offers the highest Average Revenue Per User (ARPU) of any global rewarded video ad network.

PLUGIN BACKGROUND

A couple of years ago, and after a great mistake, I got banned from Google AdsMob network. After appels to the mercy of Google, explaining what happens... I remain banned for life. This put me on a very bad situation those days, with a very short list of good monetizing alternatives. This ends the day I learn about UnityAds

After the end of the UnityAds 1.x Api era, I have to move forward and Implement UnityAds 2.x on my projects. Implement it on the Unity Game Engine was a breeze, But then I didn't found any solutions to implement version 2.x on my html5, cordova, construct 2 or 3 projects. That my friends, makes this cordova plugin a reality. Oh well, it was basically, necessity!

FEUTURES

Platforms supported:

Ad Types:

  • Non Rewarded Video
  • Rewarded Video

QUICK START

	# create a demo project
    cordova create test1 com.yournamehere.test1 Test1
    cd test1
    cordova platform add android
    cordova platform add ios

    # now add the plugin, cordova CLI will handle dependency automatically
    cordova plugin add com-artemisoftnian-plugins-unityads2

    # now remove the default www content, copy the demo html file to www
    rm -r www/*;
    cp plugins/com-artemisoftnian-plugins-unityads2/example/basic/* www/;

	# now build and run the demo in your device or emulator
    cordova prepare; 
    cordova run android; 
    cordova run ios;
    # or import into Xcode / eclipse

INSTALLATION

  • If use with Cordova CLI:
cordova plugin add com-artemisoftnian-plugins-unityads2
  • Using NPM npm install com-artemisoftnian-plugins-unityads2

USAGE

Step 1: Go and create a new project for the desire platform in UnityAds portal, Step 2: Write the specified id's in your javascript code.

// select the right Ad Id according to platform
var gameId = "Android or iOS Game ID";
var videoAdPlacementId = "Video Placement ID";
var rewardedVideoAdPlacementId = "Rewarded Placement ID";

After playing around and complete your tests, remember to put isTest = false when building for production.

METHODS

// Initialize UnityAds
UnityAdsInit(gameId, isTest, isDebug, fn);

// Video Ads Related (Regular/Rewarded)
ShowVideoAd(videoPlacementId, fn);
GetPlacementState(videoAdPlacementId, fn);

Screenshots

Android Video Ads

ScreenShot ScreenShot ScreenShot

iOS Video Ads

ScreenShot ScreenShot ScreenShot

Credits

This project is created and maintained by Waldemar Medina. Available for project outsourcing and or consulting services. Let me hear about it. I can help in your project.

Check Out my UnityAds addon for Construct 3

Donations

Now that You end your reading, (I know You where curious) please consider supporting Artemisoftnian with a donation, a cup of coffee or maybe a slice of pizza :)

paypal

or You can become a Patreon and support even more deeply, mysterious and secret stuff:

patreon

cordova-plugin-unity3d-ads's People

Contributors

artemisoftnian avatar waldemar-northeasternllc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.