Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. We're running great holiday deals on subscriptions, swag and Asset Store packages! Take a peek at this blog for more information!
    Dismiss Notice
  3. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  4. Unity 2017.2 is now released.
    Dismiss Notice
  5. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice
Dismiss Notice
Get paid on mobile. As a mobile developer, get started with In-App Purchases and Ads on our new solution page! Check it out here.

Unity IAP - " Could not load type 'UnityEngine.VR.VRSettings' from assembly 'Stores'."

Discussion in 'Unity IAP' started by bluew0, Nov 2, 2017.

  1. bluew0

    bluew0

    Joined:
    May 9, 2017
    Posts:
    8
    After update to UnityIAP 1.14.1, Error on my android device " Could not load type 'UnityEngine.VR.VRSettings' from assembly 'Stores'."

    I delete plugins/UnityChannel, UnityPurchasing folder and reimporting UnityIAP from service tab again and again, but i had got same error.

    Should I check "Build Setting - XR Setting"??

    1. I did create new project and Import UnityIAP from service tab.
    2. Build "IAP Demo" scene only, Available items initialize succeed on android device.(from debug log).
    3. Select item -> click buy button -> I had got this error.

    TypeLoadException: Could not load type 'UnityEngine.VR.VRSettings' from assembly 'Stores'.

    E/Unity (15780): at UnityEngine.Purchasing.JSONStore.Purchase (UnityEngine.Purchasing.ProductDefinition product, System.String developerPayload) [0x00000] in <filename unknown>:0

    E/Unity (15780): at UnityEngine.Purchasing.PurchasingManager.InitiatePurchase (UnityEngine.Purchasing.Product product, System.String developerPayload) [0x00048] in /Users/justing/development/unity1/Extensions/UnityPurchasing/Runtime/Purchasing/PurchasingManager.cs:60

    E/Unity (15780): at IAPDemo.<InitUI>m__2 () [0x00067] in D:\work\Unity3d\Test03\Assets\Plugins\UnityPurchasing\script\IAPDemo.cs:602

    E/Unity (15780): at UnityEngine.Events.InvokableCall.Invoke () [0x00017] in /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent.cs:165

    E/Unity (15780): at UnityEngine.Events.UnityEvent.Invoke () [0x00024] in /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:58

    E/Unity (15780): at UnityEngine.UI.Button.Press () [0x0002d] in C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Button.

    I'm using aws-sdk, facebook-sdk, JSONObject plugins.
    Unity3d version is 2017.2.0f3.

    How can i solve this error?
    Or How can i got old versions of Unity IAP?
    Thanks.
     
    Last edited: Nov 2, 2017
  2. NVSarge

    NVSarge

    Joined:
    Oct 15, 2013
    Posts:
    5
    I've got the same problem. Deleted and reimported IAP several times, nothing helps.
     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    468
    I will check with the IAP team here, and will reply when I have additional information later today.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    468
    Are you setting Virtual Reality Supported in Player Settings? If so, what SDK are you loading?
     
  5. bluew0

    bluew0

    Joined:
    May 9, 2017
    Posts:
    8
    I did not setting any virtual reality support. My project is just casual mobile game.
    Loading SDK is Facebook-SDK(Not audienceNetworkSDK), and
    AWS-SDK.(CognitoIdentity, CognitoSync, DynamoDB, Lambda, MobileAnalytics, S3, SNS)

    I did test full version of my project and
    empty version. (Delete files/folder/plugins of my project and Build Only IAP Demo.unity Scene.)

    And I always got console message "Project GPM data does not exist. Creating new object.".
     
    Last edited: Nov 3, 2017
  6. bluew0

    bluew0

    Joined:
    May 9, 2017
    Posts:
    8
    This is my plugins file list.

    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\filelist.txt
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\iOS
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\libsqlite3.so
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\x86_64
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\AndroidManifest.xml
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\animated-vector-drawable-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\appcompat-v7-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\aws-unity-sns-gcm-helper.jar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\cardview-v7-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\customtabs-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\libsqlite3.so
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\play-services-gcm-9.2.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\play-services-iid-9.2.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-annotations-25.3.1.jar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-compat-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-core-ui-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-core-utils-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-fragment-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-media-compat-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-v4-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-vector-drawable-25.3.1.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\unitynotification.jar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-hdpi
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-mdpi
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xhdpi
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xxhdpi
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xxxhdpi
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable\notify_icon_big.png
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable\notify_icon_small.png
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-hdpi\notify_icon_small.png
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-mdpi\notify_icon_small.png
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xhdpi\notify_icon_small.png
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xxhdpi\notify_icon_small.png
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xxxhdpi\notify_icon_small.png
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\iOS\Info.plist
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\iOS\IOSVersion.mm
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\iOS\ViewController.mm
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\Android
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\ChannelPurchase.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\UnityStore.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\Android\UnityChannel.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\AppStoreSettings.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\Editor
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\Editor\AppStoreModel.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\Editor\AppStoreOnboardApi.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\Editor\AppStoreSettingsEditor.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\Editor\XiaomiPackageNameExtension.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Changelog.md
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Editor
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Icons
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\iOS
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Resources
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\scenes
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\winrt
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Apple
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Editor.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Facebook
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Purchasing.Common.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Security
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Stores.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Tizen
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\AmazonAppStore.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\CloudMoolah.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\common.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\GoogleAIDL.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\GooglePlay.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\SamsungApps.aar
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Apple\Apple.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Apple\live
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Apple\live\Apple.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Facebook\FacebookStore.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Facebook\live
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Facebook\live\FacebookStore.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Security\live
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Security\Security.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Security\live\Security.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Tizen\libTizenStore.so
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Tizen\live
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Tizen\Tizen.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Tizen\live\Tizen.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\Info.plist
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\MacOS
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\Resources
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\MacOS\unitypurchasing
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\Resources\en.lproj
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\Resources\en.lproj\InfoPlist.strings
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Editor\AppleIncRootCertificate.cer
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Editor\IAPButtonEditor.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Editor\IAPGeneratedCredentials.cs.template
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Icons\LinkBlack.png
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Icons\LinkWhite.png
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Icons\UnityEngine.Purchasing.IAPButtonIcon.png
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\iOS\UnityEarlyTransactionObserver.h
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\iOS\UnityEarlyTransactionObserver.mm
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\iOS\UnityPurchasing.h
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\iOS\UnityPurchasing.m
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Resources\BillingMode.json
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Resources\UIFakeStoreCanvas.prefab
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\scenes\IAP Demo.unity
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\ComboBox.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\Demo
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\IAPButton.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\IAPConfigurationHelper.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\IAPDemo.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\IAPListener.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\link.xml
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\PurchasingCheck.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\Demo\DemoInventory.cs
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\winrt\live
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\winrt\winrt.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\winrt\live\winrt.dll
    D:\work\Unity3d\Puzzle_Work\Assets\Plugins\x86_64\sqlite3.dll

    I also have PlayServicesResolver folder.(Google.IOSResolver.dll...)
    Thanks.
     
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    468
    @bluew0 Understood, we are continuing to investigate here.
     
  8. bluew0

    bluew0

    Joined:
    May 9, 2017
    Posts:
    8
    I did test Unity IAP - Android - Target google play and Target Amazon.
    Unity purchase succeeded at Target Amazon.
    But same error at Target google play.
     
    Last edited: Nov 3, 2017
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    468
    Do you get this error on a brand new/empty project, with only IAP enabled and not other assets/plugins? We believe it may be a conflict with another asset, and this information would be helpful for us to reproduce.
     
  10. NVSarge

    NVSarge

    Joined:
    Oct 15, 2013
    Posts:
    5
    In my case this bug appears in empty project with iap only(on Unity 2017).
    Right now i have rebuild my project on Unity 5.5.0.f3 and everything seems ok so far.
     
  11. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    468
    @NVSarge What version of 2017 and is this on Windows or Mac?
     
  12. NVSarge

    NVSarge

    Joined:
    Oct 15, 2013
    Posts:
    5
    Windows 10, 2017.2
     
  13. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    468
    @NVSarge Yes, that is the configuration that I have here, and don't see the issue. Any other configuration option that you might be aware of? Other software installed that might be relevant?
     
  14. NVSarge

    NVSarge

    Joined:
    Oct 15, 2013
    Posts:
    5
    Don't have any idea, configuration seems to be simple, and i don't use any relevant thirdparty tools in this project.
    I'll try to make a clean reinstall of Unity and check.
     
  15. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    468
    Also, please list the options when you install Unity, and attempt to recreate with a new/empty project with IAP added only. Also, let us know if you've installed Android Studio and which Android version(s).
     
    Last edited: Nov 3, 2017
  16. bluew0

    bluew0

    Joined:
    May 9, 2017
    Posts:
    8
    In my case empty project with iap only.
    Windows 7, android_sdk, jdk 1.8.0_25(foldername), ndk-r10(foldername).
    Not installed android studio.
     
  17. bluew0

    bluew0

    Joined:
    May 9, 2017
    Posts:
    8
    I did completely uninstall Unity 2017.2.0f3, and reinstalled with Android Build Support, iOS Build Support.
    Create new empty project and import IAP from service tab, Build IAP Demo.unity scene only without AndroidManifest.xml.
    After i got same error, I tried Install UnitySetup-Vuforia-AR-Support-for-Editor-2017.2.0f3,
    But I got same error.
     
  18. bluew0

    bluew0

    Joined:
    May 9, 2017
    Posts:
    8
    I did install Unity 2017.1.2p2, all problem is solved.
    IAP also working good.
    I had mac build problem "Fatal error in Unity CIL Linker" on 2017.2.0f3,
    Build succeeded on 2017.1.2p2.

    All problem is solved and everything ok.
     
  19. NVSarge

    NVSarge

    Joined:
    Oct 15, 2013
    Posts:
    5
    Reinstalled clean Unity 2017.2 with android support - same VR error.
    Reinstalled 2017.1 with same configuration, even with IAP plugins from 2017.2 in project - iap works ok.
     
  20. Helath

    Helath

    Joined:
    Jan 3, 2013
    Posts:
    7
    This issue is happening for me as well :/
     
  21. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    468
    @Helath So you receive this error at runtime, when you attempt to make a purchase? What store are you targeting?
     
  22. Helath

    Helath

    Joined:
    Jan 3, 2013
    Posts:
    7
    At Runtime targeting Google Play on Unity 2017.2
    Last successful build was Unity 5.6 with IAP 1.12.0
     
  23. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    468
    In discussion with the IAP team, the fix is to choose to Update API when prompted. The newer API uses XR.Settings and not VR.Settings. Reimport IAP, and choose Yes to the Update API dialog.