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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
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.