Search Unity

error CS0103: The name 'GooglePlayTangle' does not exist in the current context also 'AppleTangle'

Discussion in 'Unity IAP' started by Syaoran-Domoto, Sep 26, 2020.

  1. Syaoran-Domoto

    Syaoran-Domoto

    Joined:
    Mar 16, 2016
    Posts:
    5
    Hi,

    I use Unity 2019.4.11f1
    Create new project, and switch to Android platform.
    Enable Service In-app purchase
    Import Unity IAP Store package 2.0.0 and install.
    Create the Tangle files from Window/Unity IAP/Receipt Obfuscation Validator.

    And
    Scripting define symbols add RECEIPT_VALIDATION

    Build error and show error log:

    Code (CSharp):
    1. Assets\Plugins\UnityPurchasing\script\IAPDemo.cs(471,48): error CS0103: The name 'GooglePlayTangle' does not exist in the current context
    2.  
    3. Assets\Plugins\UnityPurchasing\script\IAPDemo.cs(471,73): error CS0103: The name 'AppleTangle' does not exist in the current context
    4.  
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You need to manually move the file for now, I moved them to my /Assets/Scripts folder and it worked. We are working on an update to address this.
     
  3. Syaoran-Domoto

    Syaoran-Domoto

    Joined:
    Mar 16, 2016
    Posts:
    5
    Hi,
    I move AppleTangle.cs and GooglePlayTangle.cs to /Assets/Scripts folder.
    Still has same error.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Do you have other scripts there? Move them to the same location as your scripts, mine happened to be at Assets/Scripts.
     
  5. Syaoran-Domoto

    Syaoran-Domoto

    Joined:
    Mar 16, 2016
    Posts:
    5
    Hi,
    I also move IAPDemo.cs to /Assets/Scripts folder.
    Seems the error is gone.
    Thanks for help!
     
    JeffDUnity3D likes this.
  6. unity_0HEVwYWJIxRMuA

    unity_0HEVwYWJIxRMuA

    Joined:
    Jul 14, 2021
    Posts:
    4
    I have the same problem. I did what you said. but the problem continues, Can you help
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What error are you having? Please post the exact error text. You can delete IAPDemo.cs if you don't need it.
     
  8. unity_0HEVwYWJIxRMuA

    unity_0HEVwYWJIxRMuA

    Joined:
    Jul 14, 2021
    Posts:
    4
    Thank you very much for your reply my friend.but problem solved.The problem was related to IN-app purchasing, I deleted it and reinstalled it.The problem is solved. I guess there was a problem with the first installation.
     
  9. MorganYT

    MorganYT

    Joined:
    Jul 29, 2017
    Posts:
    31
    I put the google play license key in the settings, and obfuscated it. Everything worked.
     
    Frolky likes this.