Search Unity

Ads initializing automatically with wrong ID

Discussion in 'Unity Ads' started by Primoz56, Mar 28, 2019.

  1. Primoz56

    Primoz56

    Joined:
    May 9, 2018
    Posts:
    181
    Hi guys,

    I've noticed that unity ads when enabled through services automatically initializes with a random ID. I cannot find anywhere to disable this behaviour or to set up the correct ID.

    I know how to set the gameid manually and i would prefer to do so, but since it's automatically initialized with the wrong id i can't.

    Can anyone help on how to either disable automatic initialization, or where I can set the correct id for the automatic mode.

    Thanks,
    Primoz
     
  2. StartStart

    StartStart

    Joined:
    Jan 2, 2013
    Posts:
    105
    Can you paste the code that initial ads?
     
  3. Primoz56

    Primoz56

    Joined:
    May 9, 2018
    Posts:
    181
    The automatic part - there is no code.

    the manual part is:
    Code (CSharp):
    1.         if (Advertisement.isSupported)
    2.             Advertisement.Initialize(gameId);
    3.  
    but it's already initialized before that
     
  4. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    358
  5. Primoz56

    Primoz56

    Joined:
    May 9, 2018
    Posts:
    181
    Thanks, i'm going to do that. One final question though:

    Why do ads services exist if you cannot use them (can't set your own id)? is this an oversight?
     
  6. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    358
    Services integration links to a project, fetches game IDs there and initialises automatically - this can be done, but the integration has different issues on different editor versions and until these issues are resolved, we're promoting the use of Asset Store package version of the Ads SDK.
     
    JeffDUnity3D likes this.