세상사는 이야기 / 도움이 되었다면 배너 클릭 부탁드려요~ →→→

2020년 11월 12일 목요일

[UnityIAP] UnityIAP 2.2.0 업데이트 후 Error 발생

UnityIAP 2.2.0 업데이트 후 Error 발생

2020년 11월 17일 UnityIAP 2.2.1 업데이트


2020년 11월 10일 UnityIAP 2.2.0로 업데이트 되었다.

빌드 후 구매 확인하면 아래와 같은 에러가 발생한다.


에러 내용

2020-11-12 11:08:37.891 3182-3182/com.neocyon.google.ro2odin E/Unity: ArgumentNullException: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00000] in <00000000000000000000000000000000>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Purchasing.ProductCollection.WithStoreSpecificID (System.String id) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Purchasing.PurchasingManager.OnPurchaseFailed (UnityEngine.Purchasing.Extension.PurchaseFailureDescription description) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Purchasing.GooglePlayPurchaseCallback.OnPurchaseFailed (UnityEngine.Purchasing.Extension.PurchaseFailureDescription purchaseFailureDescription) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Purchasing.GooglePurchaseUpdatedListener.HandleErrorCases (UnityEngine.Purchasing.Models.GoogleBillingResult billingResult, Unit


아직 Unity IAP 팀에서 원인과 해결 방법을 찾고 있는것 같다.

https://forum.unity.com/forums/unity-iap.112/


이전 버전으로 깔고 싶지만 구글 검색해도 나오지 않는다. 

2.2.0을 삭제 후 아래 링크에서 이전 버전 2.1.1 Package를 다운로드 받으면 된다.

UnityEngine.Cloud.Purchasing-2.1.1-83eca73c.unitypackage


https://forum.unity.com/threads/unity-iap-previous-versions.527432/#post-6506544



2020년 11월 6일 금요일

[Unity IAP] UnityIAP Import중 에러 발생 "The IAP service is currently disabled"

Unity Serviece에서 Store Package를 Import중 에러가 발생했다.

error: "The IAP service is currently disabled"

The IAP service is currently disabled.

Canceling the install process now to avoid encountering errors when importing the Unity IAP asset package. The IAP service must be enabled first before importing the latest Unity IAP asset package.
Please enable the IAP service through the Services window. Then import the Unity IAP asset package again to continue the install.

Select 'Help...' to see further instructions.

UnityIAP Docs에는 아래와 같은 설명이 있다.

참고: 흔한 Unity IAP 통합 컴파일러 오류
아래 오류 메시지는 Unity Cloud 서비스 창에서 Unity IAP가 비활성화되었거나, Unity가 인터넷에 연결되어 있지 않다는 점을 나타냅니다.

CS0246: IPurchaseReceipt 유형 또는 네임스페이스 찾을 수 없음.
System.Reflection.ReflectionTypeLoadException
UnityPurchasing/Bin/Stores.dll
UnityEngine.Purchasing

이 오류를 해결하려면 우선 서비스 창을 새로고침 해야 합니다. 간단하게 닫고 다시 열면 됩니다. 새로고침 후 Unity IAP가 활성화되었는지 확인해야 합니다.
해결되지 않은 경우, 인터넷 연결을 해제하고 재연결 한 후, Unity 서비스에 다시 로그인한 다음 Unity IAP를 활성화해야 합니다. 등록 기관의 Unity 서비스 “소유자” 또는 “관리자” 만이 Unity IAP 서비스를 활성화할 수 있습니다.


이유는 Unity Package Manager내부에서 define이 꼬인것 같다.

재설치나 협업중에는 Import순서가 중요하겠다.

- Package Manager/In App Purchasing Install -> Unity Service IAP Import


1. Unity/Window/Package Manager/In App Purchasing Install


2. Unity Service/IN-APP PURCHASING - Import(Reimport) -> Import Package

3. Import 확인

Plugins, Packages폴더



그래도 안될 경우

직접 Unity Servieces 파일을 수정 한다.

ProjectSettings/UnityConnectSettings.asset

  UnityPurchasingSettings:

    m_Enabled: 1


 m_Enabled: 0 으로 되어있으면 1로 수정