googleads-mobile-unity icon indicating copy to clipboard operation
googleads-mobile-unity copied to clipboard

AppIDs dissapearing when changing code after implementing #1695

Open bigmonmulgrew opened this issue 3 years ago • 7 comments

Step 0: Are you in the right place?

  • For general technical questions, or help with project-specific issues like setting up ads in your app, reach out to our support team on the Developer Forum.

  • For assistance with your AdMob account, reach out to AdMob Support.

  • For feedback on our documentation, send your feedback by pressing the Send Feedback button at the top right of the documentation page you are on.

  • For issues related to the code in this repository, continue filing this GitHub issue.

  • Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.

[REQUIRED] Step 1: Describe your environment

  • Unity version: 2020.3.15f2
  • Google Mobile Ads Unity plugin version: 6.1.1
  • Platform: Unity Editor (iOS, Android, Unity Editor)
  • Platform OS version: Windows 10 (eg iOS 10, Android 9)
  • Any specific devices issue occurs on: _____
  • Mediation ad networks used, and their versions: _____

[REQUIRED] Step 2: Describe the problem

Apop IDs dissapear when tabbing back to unity after making a change. This appears to be the same as #1692 and #1694 Opening a new issue since I have applied the fix in #1695 and the issue appears to be related but not identical.

Steps to reproduce:

  1. Install the plugin
  2. Apply the fix in #1695
  3. Change any code in visual studio.

Relevant Code:

// TODO(you): code here to reproduce the problem

bigmonmulgrew avatar Oct 07 '21 13:10 bigmonmulgrew

Thanks, I will review.

NVentimiglia avatar Oct 07 '21 18:10 NVentimiglia

Yep, that fix worked before new release with new bad code in GoogleMobileAdsSettings script. This part of code written without testing for sure. They loading the file from the Resources and then creating a new instance. https://github.com/googleads/googleads-mobile-unity/blob/ebd375f124375d3133e7195a80208c15c7981f21/source/plugin/Assets/GoogleMobileAds/Editor/GoogleMobileAdsSettings.cs#L50-L72

madTeddy avatar Oct 10 '21 02:10 madTeddy

To fix this, try adding another null check after line 59 in the above code, like this:

         instance = Resources.Load<GoogleMobileAdsSettings>(MobileAdsSettingsFile); 

         if (instance != null) 
         { 
             return instance; 
         } 

yerfdogj avatar Oct 12 '21 18:10 yerfdogj

This issue is resolved in the latest plugin version "Google Mobile Ads Unity Plugin v6.1.2".

dareerahmadmufti avatar Nov 23 '21 04:11 dareerahmadmufti

This issue is resolved in the latest plugin version "Google Mobile Ads Unity Plugin v6.1.2".

It's not I'm using v6.1.2 and this bug still exists.

NareshBisht avatar Feb 11 '22 10:02 NareshBisht

To fix this, try adding another null check after line 59 in the above code, like this:

         instance = Resources.Load<GoogleMobileAdsSettings>(MobileAdsSettingsFile); 

         if (instance != null) 
         { 
             return instance; 
         } 

@yerfdogj I have these changes, but still facing same issue

rohitvishwakarma1819 avatar Apr 26 '22 19:04 rohitvishwakarma1819

I'm on 6.1.2 and the issue is present.

moldovev avatar Jul 26 '22 13:07 moldovev

Fixed in https://github.com/googleads/googleads-mobile-unity/releases/tag/v6.1.2.

kunny avatar Feb 06 '23 14:02 kunny