Search Issue Tracker
Won't Fix
Votes
1
Found in
2018.4
2019.4
2019.4.17f1
2020.2
2021.1
2021.2
Issue ID
1310277
Regression
No
Asmdef Script not compiled with UNITY_PURCHASING define when launching Editor after deleting Library folder
How to reproduce:
1. Open the attached project "case_1310277-Project.zip"
2. Run the test Scripts (Test->RunTest)
3. Inspect the Console Window
4. Observe that both the asmdef Script and the non-asmdef Script uses the UNITY_PURCHASING define
5. Close the project
6. Delete the Library folder in the project's directory
7. Open the project again
8. Run the test Scripts again
Expected result: Both the asmdef Script and the non-asmdef Script uses the UNITY_PURCHASING define
Actual result: Only the non-asmdef Script uses the UNITY_PURCHASING define
Reproducible with: 2018.4.32f1, 2019.4.21f1, 2020.2.7f1, 2021.1.0b9, 2021.2.0a7
Notes:
- With Unity 2021.1.0b9, 2021.2.0a7 versions, both the asmdef, and non-asmdef Scripts are not compiled with UNITY_PURCHASING, however, the Assemblies (Plugins folder) are imported in the Package itself rather than in the Assets folder instead
- In-App Purchasing must be set up through the Services tab when opening the project on another account
Workaround: Triggering a Script recompile fixes the issue (doesn't help with Unity 2021.1.0b9, 2021.2.0a7)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
Resolution Note (2021.2.X):
The IAP team has stopped including the #define for ‘UNITY_PURCHASING’ in the Unity Editor.
In certain older versions it was included when the IAP Services was turned “On”. Unity IAP required installation of two packages, previously. When only one piece was missing, developers would experience broken projects.
This is no longer true. However the Unity IAP documentation however does not reflect that, today.
To restore support for the 'UNITY_PURCHASING' symbol in a project, the ASMDEF solution described here, and also adding it to the Player settings' Scripting Define Symbols both can work.