Search Unity

How-To Install Previous Version

Discussion in 'Unity IAP' started by Livealot, Jun 4, 2020.

  1. Livealot

    Livealot

    Joined:
    Sep 2, 2013
    Posts:
    228
    @JeffDUnity3D
    Is there a guide somewhere on how to install previous version of the IAP package, like 1.19? There's a sticky post on this forum with links to previous versions, and the package manager has remove/update buttons, and the Services Panel has an IAP section with an Update button, so it's confusing.

    After thinking I successfully downgraded from 1.23 to 1.19 using the package manager, I noticed there were still log entries pointing to 1.23.

    So it would be good to know the right steps to uninstall, and install whatever version is desired.

    Thanks!
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. Livealot

    Livealot

    Joined:
    Sep 2, 2013
    Posts:
    228
    I started a new post because the link you shared only removes and reinstalls 1.23.1.

    Now that I have 1.23.1, how do I downgrade to 0.19?

    I can remove the plugin folders. I can comment out ALL my store related code. I can remove the 2.0.6 Purchasing/IAP package with package manager. And I can install the 0.19 package from package manager.

    Now I need to import the plugin folders from somewhere, maybe the zip file in your sticky link?

    Any other steps?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I assumed you already downloaded IAP 1.19. Unzip it and install it from the editor menu Assets/Import Package/Import Custom... and select the .unitypackage file. Make sure you remove IAP from your project first, and make sure it compiles and runs before you do the import.
     
  5. Livealot

    Livealot

    Joined:
    Sep 2, 2013
    Posts:
    228
    Let me try to sum up what I think are the right steps:
    1. Back up your project
    2. Ignore the IAP section of the Services tab
    3. Ignore the IAP stuff on the Asset Store
    4. Delete any/all of these folders:
      1. Assets/Plugins/UnityPurchasing
      2. Assets/Plugins/UnityChannel
      3. Assets/Plugins/UDP
    5. You will get lots of errors in the console. Manually comment out all references the plugins in your code, with good notes so you can connect them back later. Make sure your project compiles and runs before moving on.
    6. In package manager, find the current purchasing package, either under Purchasing or In-App Purchasing, and remove it
    7. In package manager, install the version you want
    8. Go to the forum stickly post with prior versions, and download the zipped package of the plugin version you want
    9. Unzip and import the plugin package into Unity, and follow the prompts
    10. Check Window/Unity IAP/IAP Updates... to confirm the version you want is installed. Do not update.
    11. Check Package manager to confirm the version you want is being used
    12. Return to your codebase and manually reconnect your code to the plugin, knowing that some functions may be missing/different based on the version
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry, there is no mention or need to do anything in Package Manager. Don't open Package Manager. If you have deleted anything there, these steps are not guaranteed to work. If you continue to have problems, you may need to start with a new project and add your assets back in.

    In summary, the steps are:

    * Delete IAP from your project (in Project View)
    * Install (only) the .unitypackage (this should install both the proper Asset Package and the correct Package Manager package, you need both but this is done for you)
    * Done
     
  7. Livealot

    Livealot

    Joined:
    Sep 2, 2013
    Posts:
    228
    I think this deserves a bunch more explanation and warning somewhere about the differences in package manager, which keeps updating, and is on 2.0.6 and populates files into the package manager section of your project vs. the plugin folders that you get from the service panel, asset store, this forum, etc. and is on version 1.23.1

    If we're not supposed to use package manager and its remove/update buttons, that's pretty important to know.

    For example, do I need to hit the remove button from package manager related to IAP and UDP?
     
    DragonCoder likes this.
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    As I mentioned, for this process, "Don't open Package Manager". The only things you need to delete are:

    Assets/Plugins/UDP
    Assets/Plugins/UnityChannel
    Assets/Plugins/UnityPurchasing
     
    Last edited: Jun 4, 2020
  9. Livealot

    Livealot

    Joined:
    Sep 2, 2013
    Posts:
    228
    My goal with this thread is to have a clean set of instructions and tips on the topic. I'll try rewriting cleanly in a bit, but I want to clarify first.

    I tried your instructions in a brand new project, using 1.19 as my target. At the end of the process:
    • Window/Unity IAP/IAP Updates...shows 1.19 installed, with 1.23 available to update (check)
    • Services Panel shows "An update is available" (check)
    • Package Manager shows "In App Purchasing" using 2.0.6 (check????)
    Since the "See all versions" of the package has a 0.19 version and an "Update to 0.0.19 button", I wanted to confirm that's unrelated to the 1.19 version of the plugin and should not be clicked. Obviously its confusing and what I initially clicked with the intent to downgrade.
     
    Sailendu likes this.
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, you are done!
     
  11. Livealot

    Livealot

    Joined:
    Sep 2, 2013
    Posts:
    228
    Here is the 2nd attempt at correct steps:
    1. Back up your project
    2. Ignore the IAP section of the Services tab
    3. Ignore the IAP stuff on the Asset Store
    4. Delete any/all of these folders:
      1. Assets/Plugins/UnityPurchasing
      2. Assets/Plugins/UnityChannel
      3. Assets/Plugins/UDP
    5. You will get lots of errors in the console. Manually comment out all references the plugins in your code, with good notes so you can connect them back later. Make sure your project compiles and runs before moving on.
    6. Go to the forum sticky post with prior versions, and download the zipped package of the plugin version you want
    7. Unzip and import the plugin package into Unity, and follow the prompts
    8. Check Window/Unity IAP/IAP Updates... to confirm the version you want is installed. Do NOT update. Every time you reload the project, you will be prompted to update IAP, do NOT update.
    9. Confirm settings:
      1. Window/Unity IAP/IAP Updates should show 1.xx installed, with 1.23 available to updat
      2. Services Panel should show "An update is available"
      3. Package Manager should show "In App Purchasing" using 2.0.6
    10. Return to your codebase and manually reconnect your code to the plugin, knowing that some functions may be missing/different based on the version
     
    KonstantinShkulev and Sailendu like this.
  12. Sailendu

    Sailendu

    Joined:
    Jul 23, 2009
    Posts:
    254
    Hi @Livealot thanks for posting the full process, I followed it and installed 1.19, after that I have the following 2 folders in the plugin directory:

    Assets/Plugins/UnityPurchasing
    Assets/Plugins/UnityChannel

    But the UDP folder is not there, is it ok? Is the UDP folder also missing in your case?
     
  13. Livealot

    Livealot

    Joined:
    Sep 2, 2013
    Posts:
    228
    That's OK. I think that folder got added in a later release.
     
    Sailendu likes this.
  14. Sailendu

    Sailendu

    Joined:
    Jul 23, 2009
    Posts:
    254
    Thanks a lot, you are so awesome, you helped me so much with this process.
     
    Livealot likes this.