Search Unity

Initializing Unity IAP when having UDP store active after updating from Unity IAP 1.22 to 1.23.1

Discussion in 'Unity IAP' started by matiasticbits, Jan 24, 2020.

  1. matiasticbits

    matiasticbits

    Joined:
    Jan 3, 2017
    Posts:
    30
    After updating Unity IAP from 1.22 to 1.23.1 the Unity IAP initialization will throw an exception when having UDP store selected. We also updated to using In App Purchasing package 2.0.6.

    Code (CSharp):
    1. InvalidOperationException: StoreService cannot find valid GameSettings.asset file! Initialization failed!
    2.   at UnityEngine.UDP.StoreService.Initialize (UnityEngine.UDP.IInitListener listener, UnityEngine.UDP.AppInfo appInfo) [0x00000] in <00000000000000000000000000000000>:0
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are you trying to publish to UDP? Are you following the directions here? https://docs.unity3d.com/Packages/com.unity.purchasing.udp@1.3/manual/index.html
     
  3. matiasticbits

    matiasticbits

    Joined:
    Jan 3, 2017
    Posts:
    30
    Yes, we are publishing to UDP, we have that target selected from Window -> Unity IAP -> Android -> UDP. Then on runtime we use Unity IAP and call
    UnityPurchasing.Initialize(IStoreListener, ConfigurationBuilder)
    and that causes this exception. With Unity IAP 1.22 this worked without an issue and I also think we tested this on 1.23 and it worked, but cannot reproduce as 1.23 is not downloadable anymore.
     
  4. matiasticbits

    matiasticbits

    Joined:
    Jan 3, 2017
    Posts:
    30
  5. caixuguang

    caixuguang

    Unity Technologies

    Joined:
    Oct 31, 2016
    Posts:
    3
  6. matiasticbits

    matiasticbits

    Joined:
    Jan 3, 2017
    Posts:
    30
    Thank you for the response. It looks like the updating process removed the UDP Settings.asset file. Restoring it fixed the issue.