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

Admob Native Advanced

Discussion in 'Unity Ads & User Acquisition' started by zeeshan077, Nov 18, 2017.

Thread Status:
Not open for further replies.
  1. zeeshan077

    zeeshan077

    Joined:
    Oct 2, 2017
    Posts:
    1
    Hello Guys n Galz,

    i just want know any one here worked on admob native advanced in unity?
     
  2. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Have you got access to their beta program? https://developers.google.com/admob/android/native-advanced says:

    /Rasmus
     
  3. litebox

    litebox

    Joined:
    Aug 29, 2011
    Posts:
    158
    Me too, did you find out anything? Looks like currently AdMob plugin supports only Android / iOS. The only solution is to write own plugin to be able to call native advanced functionality from Unity?
     
  4. Saleem_Khan

    Saleem_Khan

    Joined:
    Jan 12, 2015
    Posts:
    3
    any updates on Admob native Advance ???
     
  5. Saleem_Khan

    Saleem_Khan

    Joined:
    Jan 12, 2015
    Posts:
    3
    if Anyone here integrated Admob Native Advance ads let me know , I'm working on it
     
  6. Alexey_Ukhov

    Alexey_Ukhov

    Joined:
    Sep 20, 2017
    Posts:
    5
    Hi! I integrate Admob Native Advance ads. I receive App install ad, but when I try get AdChoices Logo texture exception thrown on android
    Texture2D adChoicesLogoTexture = _appInstallAd.GetAdChoicesLogoTexture();

    AndroidJavaException: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.google.android.gms.ads.formats.NativeAd$AdChoicesInfo.getImages()' on a null object reference
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.google.android.gms.ads.formats.NativeAd$AdChoicesInfo.getImages()' on a null object reference
    at com.google.unity.ads.NativeAdvancedAppInstallAd.getAdChoicesLogo(Unknown Source)

    Other textures and text get normally. Any suggestions?
     
    sathya likes this.
  7. sathya

    sathya

    Joined:
    Jul 30, 2012
    Posts:
    297
    So do i. It spams the following message

    NullReferenceException: Object reference not set to an instance of an object
    at _7DwxoIFqo4msA2gd7qefalu8Sdo._0l2RBGguR8VFeD0boB90jm7FgPF () [0x00000] in <filename unknown>:0
    at _7DwxoIFqo4msA2gd7qefalu8Sdo.CheckForImpressionWithoutRenderer () [0x00000] in <filename unknown>:0
     
  8. litebox

    litebox

    Joined:
    Aug 29, 2011
    Posts:
    158
    Downloaded Native Advanced Plugin from here: https://developers.google.com/admob/unity/native-advanced

    Successfully integrated, no errors. Android works like a charm, but iOS has significant memory usage, comparison:

    Android Studio Memory Profile:
    memory_android.jpg

    xCode Memory Profile:
    memory_xcode.jpg

    So I see two problems with iOS Native Advanced Support:
    1. While Android plugin implementation utilizes only 20 Mb for Native Ad, iOS uses 120 - 200 Mb for some reason - this brings a lot of crashes on non-top Apple devices.
    2. iOS plugin doesn't free memory after usage.

    Do anyone have positive experience of iOS integration? I've tried Ad Mob plugin from February of 2018, and now latest from here: https://developers.google.com/admob/unity/native-advanced. Memory usage pretty the same, does this expected behavior?
     
    SyedUmair likes this.
  9. litebox

    litebox

    Joined:
    Aug 29, 2011
    Posts:
    158
  10. ds17

    ds17

    Joined:
    Sep 18, 2018
    Posts:
    1

    Attached Files:

    herbou likes this.
  11. SyedUmair

    SyedUmair

    Joined:
    Sep 2, 2013
    Posts:
    43
    Hey, guys. I have created native ad UI using Raw Images & Text components of Unity GUI, it has been loaded successfully. But I am unable to click on the ad. Any leads, what could be the issue?
    One issue could be, I have created dummy camera which has no purpose in the scene but to avoid null reference exception, thrown by UnityEngine.GeometryUtility.CalculateFrustumPlanes due to some internal calling of the admob SDK.
    PS. I have registered my raw images and Texts using native ads' register methods.

    Thanks,
     
  12. aemobile_zq

    aemobile_zq

    Joined:
    Mar 29, 2016
    Posts:
    6
    I had the same problem...
     
  13. SyedUmair

    SyedUmair

    Joined:
    Sep 2, 2013
    Posts:
    43
    I have fixed it by setting my canvas to Screen Space - Camera and assigning the camera to canvas.
     
  14. aemobile_zq

    aemobile_zq

    Joined:
    Mar 29, 2016
    Posts:
    6
    thank you so much. i fixed it.
     
  15. st1991

    st1991

    Joined:
    Dec 15, 2015
    Posts:
    4
  16. Dmobin

    Dmobin

    Joined:
    May 28, 2018
    Posts:
    1
    Thanks for your script, but I have a problem while I tried to create UI, "Failed to register GameObject for ad asset: GameObjects registered for native advanced ad assets must have a Collider component". Please share project full or scene setup.
     
  17. KVinS

    KVinS

    Joined:
    Aug 27, 2013
    Posts:
    21
    I do not really understand whether it is possible to use the GUI? After all, we need a collider at the GameObject...
     
  18. Saeung-Jae-Lee

    Saeung-Jae-Lee

    Joined:
    Jun 3, 2015
    Posts:
    1
    how can find ForUnifiedNativeAd() method?
     
  19. chand81

    chand81

    Joined:
    Jun 2, 2011
    Posts:
    25
Thread Status:
Not open for further replies.