Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity 2019.4.23 'UnityPurchasingCallback' is inaccessible due to its protection level

Discussion in 'Unity IAP' started by pistoleta, Mar 25, 2021.

  1. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    After upgrading to 2019.4.23 I get this

    i removed the InAppPurchasing and reinstalled, got sure is the 3.0.1
    Any ideas?
     
    dan_ginovker likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Did you remove the folders as described in the release notes for the upgrade? Please compare the behavior to a new project and import IAP. Also be sure you make a full project back up before upgrading in case you need to roll back

    IAP_Upgrade.png
     
  3. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    If I did upgrade IAP it was before upgrading Unity to 2019.4.23 and I and I didnt have any issue with it, but definitively I didnt do those steps.
    What I know is once I updated unity and checked the IAP version seemed the latest one 3.0.1 from this month.
     
  4. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    thanks, removing the old folder did the trick
     
    SplenShepard and tjPark like this.
  5. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    This is happening to me with with unity purchasing 3.0.1 and 3.0.2 with Unity 2019.4.24. Is happening on windows and it doesn't matter if my project is set to iOS or Android.

    Deleting all the folders did nothing for me (Plugins/UnityPurchasing), as soon as I import it again, the error comes back.

    I tried deleting the plugin and the packagemanager folder, reimporting, reimporting all the project etc. Still happening.

    I tried with Unity 2019.2.23 and Unity 2019.2.22 and the same thing happens.

    Tested it on a new project where I didn't have any Unity service activated and the same thing happens.

    problem unity IAP.jpg
     
    Last edited: Apr 20, 2021
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please provide steps to reproduce on a new project. I'm not able to reproduce. Are you using assembly definitions?
     
  7. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    Steps to reproduce is just import unity IAP in a project, I'm not doing anything more. Unity 2019.4.24 on windows 10.
    This was not happening to me this past days, but I can't remeber if I opened a project with Unity IAP in it because I was working on something new and I'm not using it there yet. 100% sure it wasn't happening on mac os, so maybe is something related to windows update?

    I just created a new project, empty, activate unity IAP and I get the error as soon as it finishes importing.

    problem unity IAP 2.jpg

    For now I'm going to just work on mac os because this is blocking me completely.
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No repro here. I just used Unity 2019.4.15f1 on Windows 10.0.19042.928 (using "ver") and installed IAP 3.1.0 from Package Manager. Then I ran the empty SampleScene, no errors.
     
  9. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    I tried on mac os and it's happening too. WTF I can't work now... 100% blocked with this :(

    I did nothing, just opened a project with unity IAP in it (3.0.1) and now it's giving me this error. Last time I opened this project was March 26 and everything was fine. Should I just go back to an old Unity IAP? Clear Unity cache completely? I don't know how to reset this so everything is done from scratch. Is the only thing I can think of.

    Edit: deleted global cache, delete all packages inside Library/Unity/cache... as soon as I import Unity IAP the same error comes up. Done again in a new created completely empty project.

    Also I tested installing Unity IAP 2.2.2 and no problem at all. So I'm just going to keep using that version for now.
     
    Last edited: Apr 21, 2021
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Steps to reproduce would help, I shared my steps. Otherwise, yes use the version that works for you. If you could, please create an empty project, add IAP and see if you get the error. Then remove the /Library folder and zip it up and attach here.
     
    Last edited: Apr 21, 2021
  11. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    That's exactly what I did, as I said in my previous messages.

    - Created a new empty project
    - Linked it to an old unity project I'm not using so I can enable unity services
    - Enabled Unity IAP
    - Import Unity IAP

    Error message appear.

    I attached a new project where I did exactly that.
     

    Attached Files:

  12. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    This was not a new project. You did not delete Assets/Plugins/UnityPurchasing https://forum.unity.com/threads/uni...to-its-protection-level.1082075/#post-6974699
     
    Last edited: Apr 21, 2021
  13. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    Yes, it was a new project. When I import Unity IAP, the Unity IAP installer creates the folder Plugins/UnityPurchasing.
     
  14. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    How are you installing IAP? It should be just from Package Manager (not the Services window). But regardless, there does seem to be an issue since you got into this state by default. I'm on Windows, not sure if that makes a difference.
     
    IvyKun likes this.
  15. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    Ohhh I see what the problem is now.
    I was installing the package from the packagemanager, and then going into the Services Window, enabling it there, and importing from there, thinking I was importing the new installed package from the packagemanager.
     
  16. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yeah, I talked to engineering. We are working on this to ensure that IAP only has visibility from Package Manager, a few months out. Sorry for the inconvenience.
     
    IvyKun likes this.
  17. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    Many thanks Jeff! This's been driving me crazy all day.