I’m not sure how to resolve this, but when I build the project directly in Unity (Mac) the Unity Services show that IAP is enabled and running and there are no build issues.
As soon as I try to build from the command line with -batchmode that same build is unable to verify that the IAP Services is active and the build fails wherever there is a Store reference.
Is there a new way to setup IAP when running in batch mode with 2017.3.0p4? This was working fine under 5.6.0f3.
I’m building with Jenkins (v2.89.3) running the “Invoke Unity3d Editor” with the following command line arguments:
-quit -batchmode -buildTarget iOS -serial ##### -username ##### -password ##### executeMethod Jenkins.PerformDeviOSBuild
I successfully use this same command, building the same code with Unity 5.6.0f3.
I am able to successfully build and run the code using the Editor, so I know the build works. But running from command line it appears Unity is unable to verify (include?) the IAP Service in order for the build to finish without errors.
I get this warning when building from the command line (-batchmode). From the command line build Unity isn’t aware that IAP has been enabled in the Services window. When I launch the project in the Editor, the IAP service shows enabled.
-----CompilerOutput:-stderr----------
Assets/Plugins/UnityPurchasing/script/PurchasingCheck.cs(3,0): warning CS1030: #warning: `“Unity IAP plugin is installed, but Unity IAP is not enabled. Please enable Unity IAP in the Services window.”’
-----EndCompilerOutput---------------
But why would it work, with the same Jenkins station, building with Unity 5.6.0f3 and not with 2018.1.0b (or 2017.xxx)? Are you suggesting that there’s a new permissions aspect to the Services that is preventing this with the latest version of Unity?
To clarify, Unity attempts to build the app, but the Services is not enabled during a command line batchmode build so the IAP file fires off errors because it can’t access the IAP content. Everything else Unity-wise builds except anything having to do with IAP Services (which is the only service that should be enabled).
This is getting ridiculous. Changing the user types didn’t change anything. Could this be a timing issue with Unity after launching where if it takes too long to connect and sync up the Services that it’s causing a continuation of the build to bail?
@PGI2017 that is an area that we are investigating. Keep in mind that any fix for this would need to go through the release cycle for a future version of the Editor.
This bug still exists in Unity2017.4.8f1, Unity2017.4.25f1 too.
If I use Unity in window mode, the ServiceWindow shows UnityIAP is Enabled.
However, using with batchmode, the editor log show an error below.
Assets/Plugins/UnityPurchasing/script/PurchasingCheck.cs(3,0): warning CS1030: #warning: `"Unity IAP plugin is installed, but Unity IAP is not enabled. Please enable Unity IAP in the Services window."
It seems to be connect Unity License Server to check whether UnityIAP is enabled when Unity.app works up.
But, in batchmode, this process doesn’t worked. So, build is failed.
Are there any solutions to be enable UnityIAP in batchmode ?
I’m also encountering this problem for both iOS and Android. Unity 2018.3.14f1.
Assets/Plugins/UnityPurchasing/script/PurchasingCheck.cs(3,0): warning CS1030: #warning: `“Unity IAP plugin is installed, but Unity IAP is not enabled. Please enable Unity IAP in the Services window.”
And this makes the IAP functionality not working in the final build.
My setup is Gitlab CI with self-hosted build machine.
I also think that this may relate to “Editor time to sync up Services” as other users said (?!)
This is the syntax:
/Applications/Unity/Hub/Editor/2018.3.14f1/Unity.app/Contents/MacOS/Unity -nographics -quit -batchmode -logFile -buildTarget Android -executeMethod Aegis.Build -projectPath xxxx -buildPlatform android -buildOutput xxxxxx -gameVersion 1.1.0 -gameBuildNumber 47