Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

IAP Button goes missing...

Discussion in 'Unity IAP' started by Deleted User, Nov 6, 2017.

  1. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    9,999
    If you Google for this error you will find a few suggestions, not specific to IAP. As mentioned, try with the Sample IAP project to compare.
     
  2. Meatloaf4

    Meatloaf4

    Joined:
    Jul 30, 2013
    Posts:
    101
    I am also having this issue with 2018.4.30f1 & IAP 2.1.1.

    I would be happy to send along anything that would expedite this issue getting fixed as it's quite annoying especially working with a build pipeline.

    Thanks in advance!
     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    9,999
    Please provide steps to reproduce in your case. Please use the latest IAP 2.2.5 IAP asset and 2.2.1 In App Purchasing library in Package Manager.
     
  4. Meatloaf4

    Meatloaf4

    Joined:
    Jul 30, 2013
    Posts:
    101
    No problem.

    Repro Steps
    1. Create Unity project.
    2. Open package manager and install IAP package (or update to 2.2.1).
    3. Open service window and enable IAP
    4. Select import button (following all steps of import button pop up window).
    5. Add IAP Button to a gameobject in scene.
    6. Save scene.
    5. Close project.
    6. Delete library folder.
    7. Open previously closed project (reimport of assets should occur).
    8. Open previously saved scene.
    9. Navigate to gameobject containing IAP Button created.
    10. At this point IAP Button component should give error ("The associated script can not be loaded...")
     
  5. Meatloaf4

    Meatloaf4

    Joined:
    Jul 30, 2013
    Posts:
    101
    I also went ahead and followed all steps above replacing steps 3 & 4 with

    3. Import IAP asset from asset store.
    4. Follow all steps of IAP pop up window.

    The result is the same. The IAP Button gives error "The associated script can not be loaded..." in the saved scene.
     
  6. Meatloaf4

    Meatloaf4

    Joined:
    Jul 30, 2013
    Posts:
    101
    A relatively easy workaround I've found, albeit not perfect is to add "UNITY_PURCHASING" to the define symbols manually.

    My suspicion is that UNITY_PURCHASING define symbol is either not being defined in time or not being defined at all on initial import and thus IAP Button is not being loaded.
     
    nicholasr likes this.
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    9,999
    @Meatloaf4 What version does it say as installed when you go to Window/Unity IAP/IAP Updates... ? The issue is likely caused by deleting the /Library folder (which would be a bug) . When sharing projects via Source Control and using a build pipeline, the /Library folder is usually not included and set to ignore. We will look into this.
     
  8. Meatloaf4

    Meatloaf4

    Joined:
    Jul 30, 2013
    Posts:
    101
    Exactly, this bug makes it near impossible to have a reasonable build pipeline (including using Unity Cloud Build which is what I'm doing :) )

    It says I have 2.2.5 installed. See image below.

    upload_2021-1-6_12-52-35.png
     
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    9,999
    Got it! I will follow up with the team here on this issue, it's overdue.
     
    Meatloaf4 likes this.
  10. Meatloaf4

    Meatloaf4

    Joined:
    Jul 30, 2013
    Posts:
    101
    Hey Jeff I just had this issue happen again & was wondering if you followed up with the team to get it fixed?

    Thanks in advance!
     
  11. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    9,999
    Yes, we are actively working on it! It should be in a release available in a few months
     
    Meatloaf4 likes this.
unityunity