Search Unity

Unity Ads

Discussion in 'Unity Ads & User Acquisition' started by goat, Mar 21, 2015.

  1. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Hey,

    I downloaded the newest Unity Ads in Unity 5 Personal Edition and frustratingly it creates compilations errors if you don't have iOS or Android set as your current build target. Ideally, it would nicely not present any ads but remain stubbed out and integrated for platforms Unity Ads doesn't support yet so we don't get those errors.

    Also, I was thinking about the type of ads offered and they are pretty stale and boring. I don't know who Zynga Looney Tunes Dash uses but they unproductively keep showing the same ads over & over and horrifyingly showed an ad for some new Bates Motel TV show that couldn't be believed for subject matter and crassness in it's presentation during a Everyone+ rated game.

    In Unity Ads, It'd be nice to see ads that allow for downloading of assets like new car models in games that use cares and similar ad ventures. Also, visual ads can interrupt game play and often get quickly closed, I think that 15 - 30 radio clips of say, new musical artists and such would work well as a alternative to current advertising scheme and open the market to something other than game advertising.

    Respectfully, otherwise the volume gets turned all the way down, as I've and others have done with the ads now that get served with the Looney Tunes Dash game.

    Thanks.

    Ciao
     
    unity-nikkolai likes this.
  2. IvanDonets

    IvanDonets

    Joined:
    Feb 19, 2014
    Posts:
    117
    So how is your experience with unity ads after a year?
     
  3. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    @goat: Thanks for the feedback. As for the platform specific errors in Unity 5.2 or later, anywhere that you reference Unity Ads in your code should be wrapped with a conditional compile statement that checks to see if Ads are enabled in the Services window and supported for the current build platform.
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. #if UNITY_ADS
    4. using UnityEngine.Advertisements;
    5. #endif
    6.  
    7. public class UnityAdsSimpleExample : MonoBehaviour
    8. {
    9.     public string iosGameId;
    10.     public string androidGameId;
    11.  
    12.     public bool enableTestMode;
    13.  
    14.     IEnumerator Start ()
    15.     {
    16.         #if UNITY_ADS
    17.         if (Advertisement.isSupported && !Advertisement.isInitialized)
    18.         {
    19.             string gameId = null;
    20.  
    21.             #if UNITY_IOS
    22.             gameId = iosGameId;
    23.             #elif UNITY_ANDROID
    24.             gameId = androidGameId;
    25.             #endif
    26.  
    27.             Advertisement.Initialize(gameId,enableTestMode);
    28.         }
    29.  
    30.         yield return new WaitUntil(
    31.             () => Advertisement.isInitialized && Advertisement.IsReady()
    32.         );
    33.  
    34.         Advertisement.Show();
    35.         #endif
    36.  
    37.         yield break;
    38.     }
    39. }
    40.