Search Unity

Unable to resolve reference 'UnityEngine.UI'

Discussion in 'Unity IAP' started by mudloop, Jun 24, 2019.

  1. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Hi,

    When using Unity 2019.2.0b5, I get this error when importing the IAP plugin :

    Assembly 'Assets/Plugins/UnityPurchasing/Bin/Stores.dll' will not be loaded due to errors:
    Unable to resolve reference 'UnityEngine.UI'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector.​

    I realize that I'm using a beta version of Unity, but since I can't downgrade without breaking a ton of stuff in my project, I was wondering when we can expect a new version of the package that will solve this error?

    Thanks!
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    There are known issues with IAP on Unity 2019, if you search this forum you find several threads, some with work arounds that have worked for a few people.
     
  3. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Thanks, I've had a look and didn't find any solutions that worked for me. So I guess my 3 options are :
    - downgrade (which will be a ton of work)
    - wait for a fix
    - use a 3rd party IAP plugin for the time being

    Guess I'll just wait for a bit, and if the fix takes too long I'll integrate a 3rd party plugin (that doesn't leverage the Unity plugin).
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you elaborate why they didn't work? I have a working IAP project in 2019 using the steps mentioned, although there are no additional plugins or assets at all in my project, so it is a limited test, granted.
     
  5. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    I believe it's because I'm not just on any 2019 version, but the 2019.2 beta, which (if I understand correctly) replaces the included UI library with a package, and because of that, the references to this library from Store.dll are broken.

    I have tried using a relatively old IAP version that I still had in some other projects (1.21.0), the version on the asset store, and different versions available in the package manager. All seem to have the same problem.
    Edit : also tried importing the IAP package in an empty Unity2018.2.14 project and moving over the files... Upon doing so, it doesn't immediately show any errors, but all UI elements turn blank (so it looks like it's preventing the UI package to properly load)... Then if I reopen the project, it starts showing that same error.
     
    Last edited: Jun 26, 2019
    JeffDUnity3D likes this.