카테고리 없음

본캠프_TIL_5일차

티-히히 2024. 9. 13. 21:05

 

 

Error showing Ad Unit Rewarded_Android: NOT_READY - Placement Rewarded_Android is not ready
UnityEngine.Debug:Log (object)
RewardedButton:OnUnityAdsShowFailure (string,UnityEngine.Advertisements.UnityAdsShowError,string) (at Assets/Scripts/RewardedButton.cs:72)
UnityEngine.Advertisements.Utilities.CoroutineExecutor:Update () (at Library/PackageCache/cohttp://m.unity.ads@4.12.0/Runtime/Advertisement/Utilities/CoroutineExecutor.cs:17)


오늘은 이 에러에 대해서만 파기로 했습니다.

Error showing Ad Unit Rewarded_Android: NOT_READY - Placement Rewarded_Android is not ready


이 부분을보면

광고가 아직 완전히 로드되지 않은 상태거나
광고를 표시하려고 시도했지만, 준비 상태를 확인하지 않고 Show() 메서드를 호출한 경우일 가능성이 있습니다.

그다음 에러 구문을 보겠습니다

 

RewardedButton:OnUnityAdsShowFailure (string,UnityEngine.Advertisements.UnityAdsShowError,string) (at Assets/Scripts/RewardedButton.cs:72)


72줄의 코드에서 나타나는 에런라는 뜻입니다 그럼 이 메세지를 보여주는 코드를 보겠습니다

 

 public void OnUnityAdsFailedToLoad(string adUnitId, UnityAdsLoadError error, string message)
 {
     Debug.Log($"Error loading Ad Unit {adUnitId}: {error.ToString()} - {message}");
     // Use the error details to determine whether to try to load another ad.
 }


아직 잘 모르겠네요
별 내용이 없습니다.

OnUnityAdsFailedToLoad를 더 알아보기위해 클래스를 들어가봤습니다.

 

WARN: 버전이 일치하지 않습니다. 예상: '2.1.0.0', 실제: '4.1.2.0'


어셈블리의 버전이 예상된 버전(2.1.0.0)과 실제 로드된 버전(4.1.2.0)이 다르다는 것을 의미합니다. 버전 불일치로 인해 호환성 문제 또는 기능적 차이가 발생할 수 있다고합니다.

 

확인: 'Systehttp://m.Runtime.CompilerServices.Unsafe, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null'
'Systehttp://m.Runtime.CompilerServices.Unsafe, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null' 이름으로 찾을 수 없습니다.


Systehttp://m.Runtime.CompilerServices.Unsafe라는 어셈블리를 찾을 수 없다는 메시지도 있습니다. 이는 해당 어셈블리가 존재하지 않거나 버전 문제로 인해 로드되지 못한 상태입니다.

어셈블리(외부라이브러리) 버전 불일치 문제로 예상해봅니다.
제가 가지고 있는 패키지의 버전은4.1.2.0이니 하위버전으로 바꿔보려 했으나 하위버전을 찾을 수 없었습니다.

그래서 유니티를 다른버전으로 깔았습니다(2022.3.46f1 lts)
그 후 프로젝트를 실행한 결과 외부라이브러리 문제는 생기지 않았으나....

역시나  Rewarded_Android: NOT_READY 에러가 떴습니다................