error CS1029: #error: 'UnityFx.Purchasing requires Unity IAP service to be enabled.'

We are in the process of updating to 2020.3.1f1 from 2019.4.16f1.

We get this error
error CS1029: #error: ‘UnityFx.Purchasing requires Unity IAP service to be enabled.’

This happens only on our build machine.

I fixed this issue one my local machine by enabling IAP in the build settings. When I open the project directly on the build machine (from the build folder) the

I can confirm that Unity IAP plugin is installed.

Platform is set to iOS in the Build Settings on both machines.


Assets/Scripts/BEK/Payment/Scripts/Startup.cs(10,8): error CS1029: #error: ‘UnityFx.Purchasing requires Unity IAP service to be enabled.’

Assets/Plugins/UnityPurchasing/script/PurchasingCheck.cs(2,10): warning CS1030: #warning: ‘“Unity IAP plugin is installed, but Unity IAP is not enabled. Please enable Unity IAP in the Services window.”’

Seems like a Unity bug. Turning on IAP doesn’t update ProjectSettings.asset properly.

It looks like this after turning on IAP.

scriptingDefineSymbols:
1: UNITY_POST_PROCESSING_STACK_V2
7: UNITY_POST_PROCESSING_STACK_V2;TMP_PRESENT;UNITY_PURCHASING
13: UNITY_POST_PROCESSING_STACK_V2
19: UNITY_POST_PROCESSING_STACK_V2
21: UNITY_POST_PROCESSING_STACK_V2
25: UNITY_POST_PROCESSING_STACK_V2
26: UNITY_POST_PROCESSING_STACK_V2
27: UNITY_POST_PROCESSING_STACK_V2
28: UNITY_POST_PROCESSING_STACK_V2
additionalCompilerArguments: {}

To address the issue I added “;TMP_PRESENT;UNITY_PURCHASING” to the rest of the lines below and now the setting persists through to the build machine: