Search Unity

Unity cross-platform in app purchase causing exception in windows

Discussion in 'Unity IAP' started by monster5, Sep 13, 2018.

  1. monster5

    monster5

    Joined:
    Feb 3, 2015
    Posts:
    8
    Hello all, i am using unity 2017.4.10f1 and building for Universal windows platform .
    i am b making a game and i want to add iap to it using unity cross-platform in app purchase
    Every thing works fine in the editor but when i build and test it on vs i get this exception :


    Exception thrown: 'System.AccessViolationException' in UnityEngineProxy.dll
    Exception thrown: 'System.TypeInitializationException' in UDP.dll
    Exception thrown: 'System.TypeInitializationException' in Stores.dll
    An unhandled exception of type 'System.TypeInitializationException' occurred in Stores.dll
    The type initializer for 'UnityEngine.Purchasing.StandardPurchasingModule' threw an exception.


    on this line:

    Code (CSharp):
    1. var module = StandardPurchasingModule.Instance();
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    monster5 likes this.