Search Issue Tracker
By Design
Votes
0
Found in [Package]
3.0.0-pre.4
Issue ID
1301448
Regression
No
Scripts in Assembly Definitions cannot reference UnityPurchasing classes after recompiling
Reproduction steps:
1. Open user attached project
2. Make any change to "Assets\Assembly That Uses IAP\ScriptThatUsesIAP.cs"
Expected result: The script compiles properly
Actual result: The IAP References break causing compilation errors
Reproducible with: 2.2.1 (2018.4.31f1, 2019.4.19f1, 2020.2.2f1), 3.0.0-pre.4 (2021.1.0b4, 2021.2.0a3)
Notes:
On 3.0.0-pre.4 the error points to a duplicate .dll name
Restarting the Editor solves the problem until the next recompilation
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
- The Property's reference does not default to "_MainTex" when creating a new Texture2D Property in a ShaderGraph
- The "--additional-libraries" argument is ignored when building projects with the IL2CPP scripting backend
- Matching Selectors list not updating correctly with element's pseudo-state updates
- [Android] Crash on vendor/lib64/egl/libGLES_mali.so when Graphics Jobs(Experimental) is disabled and the Player is running on the Google Pixel 6 with the March security patch installed
- Profiler does not profile after building the Project with Autoconnect Profiler Option enabled
Resolution Note:
In order to prevent this error, you must reference UnityEngine.Purchasing.asmdef inside your AssemblyThatUsesIAP.asmdef's Assembly Definition References. (See attached image if using the Inspector UI)