I have been trying to use the Game Services Analytics beta, but for some reason i cannot make a build.
The implementation works, the events are triggered, no errors are found in the console.
Once i try to build, it stops with the following error: “Error building Player because scripts had compiler errors”
In the console there are no other errors. If i remove the unity analytics package, the build succeeds.
The analytics version i use is: “com.unity.services.analytics”: “3.0.0-pre.3”
Unity version 2019.4.30f1c3
Target platform: Android
Does anyone know how to fix the issue? What other information shall i provide to fix the issue?
Please post the exact error messages. The compiler errors should be listed with the filename and line number. I was able to create a build using Unity 2020.3.18f1 and Unity 2019.4.1f1 for example, without issue using 3.0.0-pre.3. Did you create a Unity Cloud/ProjectID?
I have followed this tutorial to set it up: Get started with Analytics
I dont have that services dropdown, so i have used the old services tab to link my project. But linking worked, the events are triggered. I have problem only with the build.
Here are the errors:
Error building Player because scripts had compiler errors
Build completed with a result of ‘Failed’ in 8 seconds (8230 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr)
UnityEditor.BuildPlayerWindow+BuildMethodException: Error building Player because scripts had compiler errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bf] in <0f738ce44a38415980c84a3da5dab2ff>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <0f738ce44a38415980c84a3da5dab2ff>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr)
There were no errors indicating this, but i had some json dlls in my project (“Newtonsoft.Json”). Since i wanted to build for android, i had to remove the one which had android selected in the “Selected platforms for plugin”
I’m getting exactly the same issue as the OP except that I am building for iOS. I tried removing Newtonsoft JSON from the Packages but that did not help.
What other conflicts might there be with the Analytics package? There is nothing I can find in the editor.log file to help identify the reason for the “compiler errors” and failed build.
Yes, I had seen that. Thank you. I was hoping for something a bit more specific after attempting that process for 2 days with no success.
Similarly, it’s frustrating that the error message can’t/won’t give any clue as to where it failed, no hint of a file or module name. “Compiler errors” with no further detail is not helpful, leading to a multi-day investigation full of trial and error.