Search Issue Tracker
Fixed in 2.2.1
Votes
9
Found in [Package]
2018.3.0a1
2018.3.8f1
2019.1.0a1
2019.2.0a1
Issue ID
1136555
Regression
Yes
UNITY_PURCHASING define becomes disabled when recompiling assemblies
Steps to reproduce:
1. Open User-supplied project ("Change IAP setting from code.zip")
2. Enable IAP in Services
3. Press Commands (at the top) -> Write UnityConnectSettings (This reads the UnityConnectSettings.asset file and writes it back EXACTLY as it was. It will print to the console.)
4. Open Assets -> Editor -> Commands.cs
5. Make Changes to the script (for example comment out [MenuItem("Commands/Dummy!")])
6. Return to Unity and inspect the Console window
Expected: Nothing appears after a recompile
Actual: "Assets\Editor\Commands.cs(6,10): warning CS1030: #warning: 'UNITY_PURCHASING is disabled! (but is it really...?)'" appears, indicating that
UNITY_PURCHASING is disabled
Reproduced in: 2018.3.0a1, 2018.3.10f1, 2019.1.0b8, 2019.2.0a9
Not reproduced in: 2017.4.24f1
Comments (3)
-
CanisLupus
Jun 19, 2020 13:31
This issue is really frustrating! We have lost dozens of hours working around this in our custom build pipeline (it now involves restarting Unity twice before AND after a build for a certain platform, to guarantee that all assemblies see the correct state of the IAP system) and we STILL encounter it in other random situations where we don't even touch the setting.
We _try_ to counter it by forcing assembly reloads from code (by adding a new define symbol and then removing it) but our process needs to write to a file what we were doing so that we can read it and return to that after the compilation finishes. It's REALLY terrible.
-
ODINKONG
Jul 20, 2019 01:10
Is there a work around for this issue? I collaborated from PC to MAC and the Mac version doesn't seem to have a definition for the UNITY_PURCHASING Directive.
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
- [WebGL][Android] Corrupt header when connecting via IP
- Editor and Android Player hangs/freezes when repeatedly Loading/Unloading AssetBundle in Vulkan
- Selecting a Material for HDRP Decal Projector in the Inspector window spams errors in the Console
- Expanded Asset Preview Box moves/hides when creating new Asset in Project window
- Player crashes on Meta Quest with "/apex/com.android/runtime/lib64/bionic/libc.so" when using OpenXR Plugin in a specific project
Resolution Note (fix version 2.2.1):
Seems to be fixed with the recent releases of IAP: Package Manager 2.2.1 and Asset Store 2.2.4.