Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

No ADS view in IOS app.

Discussion in 'Unity Ads & User Acquisition' started by rollinghome, May 25, 2017.

  1. rollinghome

    rollinghome

    Joined:
    Nov 10, 2014
    Posts:
    4
    I can not see any ads in the editor to test it.
    I have this code in other older apps without any problems.

    Unity Version 5.6.1f1

    using UnityEngine;
    using UnityEngine.Advertisements;

    public class ads : MonoBehaviour

    {
    void Start ()
    {
    if (Advertisement.IsReady())
    {
    Advertisement.Show();
    }
    }
    }
     
  2. rollinghome

    rollinghome

    Joined:
    Nov 10, 2014
    Posts:
    4
    I have done a project with only 2 simple scenes. If i click on a button, i move to the next scene. With the code above all works fine with advertising.

    So, maybe there are some issues with asset store plugins?
     
  3. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    365
    It usually takes a few seconds (depending on networking and traffic) to download the ads after they initialise. IsReady() will return false until ads have been downloaded.

    Use:

    IEnumerator Start() {
    while (!Advertisement.IsReady()) yield return null;
    Advertisement.Show();
    }