Search Unity

unityads initialization problem

Discussion in 'Unity Ads & User Acquisition' started by HoyaGames, Jan 20, 2015.

  1. HoyaGames

    HoyaGames

    Joined:
    Jan 16, 2015
    Posts:
    2
    Hi !
    But we have a problem, who during the first step.
    -> http://unityads.unity3d.com/help/Documentation for Publishers/Integration-Guide-for-Unity-Asset-Store
    I have run in to from this site.

    On the Unity editor initialization well was also well be the debug log window displays, advertising has become a functioning normally.

    But when I run on my smartphone "Galaxy Note3" After this twisted logic built into the Android game, is strangely works.
    Start and stop the camera is not to move the camera moving.

    My code is
    Code (CSharp):
    1.  
    2. void Start()
    3. {
    4.       //unityads initialize
    5.         if (Advertisement.isSupported)
    6.         {
    7.             Advertisement.allowPrecache = true;
    8.             Advertisement.Initialize("MyID", true);
    9.         }
    10.         else
    11.         {
    12.             Debug.Log("This Devices not supported");
    13.         }
    14. }
    15.  
    16.  
    17.         // show
    18.         if (Advertisement.isReady("pictureZone"))
    19.         {
    20.             Advertisement.Show("pictureZone", new ShowOptions
    21.             {
    22.                 pause = true,
    23.                 resultCallback = result =>
    24.                 {
    25.                     if (result == ShowResult.Finished)
    26.                     {
    27.                         PlayerStatus.Gold += 10;
    28.                     }
    29.                 }
    30.             });
    31.         }        


    Advertisement.Initialize("My ID", true);

    "My ID" has had well here insert GameID, test Mode -> true

    So I think I put a call occurs, the code in the Start-up settings to Invoke the function this time the game is good, but there was no response.

    APK is not yet set the details were not released because I want to know what its like.

    Thank you for reading this far.
     
    Last edited: Jan 20, 2015
  2. Salazar

    Salazar

    Joined:
    Sep 2, 2013
    Posts:
    235
    Hello,

    Your script looks missing. I wonder if there is a compilation error? You are using an if statement out of a function.

    Here is the link to integration, sample code by unity officials.
    If it not helps, share..


    Regards,
     
    unity-nikkolai likes this.
  3. HoyaGames

    HoyaGames

    Joined:
    Jan 16, 2015
    Posts:
    2
    Wow thank you so much for all your help.

    Create a new scene based on existing know who I tried to walk with the same link test results came out, "Oh, this is the problem, not the problem of the script to me," I thought.

    So I re-built by the import unityads package from the Asset Store is great.

    Thank you very much. ^ 0 ^
     
    Salazar likes this.
  4. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    You might also find this post helpful. It goes into a bit more depth concerning Picture Ads, initialization with test mode, and how to show an advertisement when your application starts.
     
    Salazar likes this.