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
- [Tile Palette] Sprites not rendering when brush tool "Paint a filled box with active brush" is used for the first time
- Adding available Nodes with longer names in Fragment Context window overflow Fragment Context window in Shader Graph
- "Layer Palette Profile" Asset is automatically applied to the second Terrain but doesn't load any layers
- "Terrain Tools" shortcut conflicts with the Overlays shortcut by default
- Longer Shader Graph Property Reference names breaks VFX Graph Output Particle Node
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.