Search Unity

Unity Monetization SDK 3.0.3 not working on Android devices?

Discussion in 'Unity Ads' started by srodrigodev, Apr 4, 2019.

  1. srodrigodev

    srodrigodev

    Joined:
    Oct 15, 2018
    Posts:
    14
    Hi,

    I just tried this plugin and works fine on the editor, on test mode.

    I made an Android build, same code, registering my phone as a test device on the Unity dashboard, as describes on the docs. The ads show, but when closing the ad, the game freezes, black screen.

    Is anyone having similar problems? I've read some comments on the plugin's page complaining about the same issue.

    EDIT: Using Unity 2018.3.11.f1
     
  2. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    Hello @srodrigodev
    Is it reproducible with an empty project? Have you used packman integration or Asset Store? Can you submit a simply repro project via BugReputer?
     
  3. srodrigodev

    srodrigodev

    Joined:
    Oct 15, 2018
    Posts:
    14
    Hi @DenisasK, I imported the plugin from the Asset Store using the Import button.

    I haven't tried with an empty project. I'll see if I can do that.
     
  4. srodrigodev

    srodrigodev

    Joined:
    Oct 15, 2018
    Posts:
    14
    @DenisasK Interesting.. I've created a brand new project with just one scene and one button. I've attached the exact same script I was using for the video button on my game (which uses the same game id and same placement name), and it worked fine. It returned to the scene after closing the ad.

    There must be something going on in my project... One thing I've noticed is that the popup saying "can the Unity cooki collect and use your data to tailor your ads and experience?" appears only once on the new project, but appears twice on mine when I click on the button (once when I click on the game button, and again when I click on Accept and is already showing the video). That's the only strange thing I can see at the moment...

    EDIT: Forgot to mention that I added the Unity Ads Monetization SDK from the assets store inside the editor, in the same way I did for my game.
     
  5. srodrigodev

    srodrigodev

    Joined:
    Oct 15, 2018
    Posts:
    14
    I found the problem... I had both an OnClick event set on the editor, and RequireComponent on the script, which was setting the OnClick programmatically. This might explain why it was showing the cookies collection confirmation twice.

    Now the game goes back to the previous scene after closing the ads.

    There is no problem with the SDK then.
     
  6. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    Great to hear that you solved the issue. Anyway, it looks like a bug for me (corner case but a bug).
     
    srodrigodev likes this.