Cloud Build warning: Can't find custom attr constructor image

I have an iOS build target set up in Unity Cloud Build. The build is passing, and the built player is running without any obvious issue. However, the build log is filled with warning lines like this:

Can't find custom attr constructor image: /BUILD_PATH/derploid.highhandholdem.android-dev/HighHandHoldem/Library/PackageCache/com.unity.ads@3.4.4/Editor/UnityEditor.Advertisements.dll mtoken: 0x0a00000f due to: assembly:/UNITY_PATH/Unity/macos/published/Unity-2019_3_0f6/Unity.app/Contents/Managed/UnityEngine/UnityEngine.CoreModule.dll type:UnityAPICompatibilityVersionAttribute member:void {0}(string,string[]) signature:.ctor

This same message appears probably 2 or 3 dozen times in the Compact Log, and its really getting in the way of other, “substantial” log messages. I am using the IL2CPP scripting backend, and I’ve installed the Unity Ads package. As far as I can tell, this warning is saying that it had issues generating C++ from the Unity Ads IL because the UnityAPICompatibilityVersionAttributeconstructor was missing. I’ve tried adding a link.xml file to try and preserve that constructor, but unfortunately none of the following have worked:

  • <assembly fullname="UnityEngine.CoreModule"><type fullname="UnityAPICompatibilityVersionAttribute" preserve="nothing"><method signature="System.Void .ctor(System.String, System.String[])"/></type></assembly>
  • <assembly fullname="UnityEngine.CoreModule"><type fullname="UnityAPICompatibilityVersionAttribute" preserve="nothing"><method name=".ctor"/></type></assembly>
  • <assembly fullname="UnityEngine"><type fullname="UnityAPICompatibilityVersionAttribute" preserve="nothing"><method name=".ctor"/></type></assembly>
  • <assembly fullname="UnityEngine.CoreModule"><type fullname="UnityAPICompatibilityVersionAttribute" preserve="all"/></assembly>
  • <assembly fullname="UnityEngine"><type fullname="UnityAPICompatibilityVersionAttribute" preserve="all"/></assembly>

I have not tried using preserve="all" on the full UnityEngine or UnityEngine.CoreModule assemblies, as that seems like a cludge. Hoping someone familiar with Cloud Build and/or IL2CPP can help me out here…

Hi @Rabadash8820 ! I am having the same issue when trying to automatize building process with Jenkins, did you reach out how to solve this? Thanks :slight_smile:

@gabriel_marin_psious Unfortunately no :confused: Tbh, this warning just kind of comes and goes as I change Unity versions, add/remove packages, update my managed plugins, etc. It’s not always the same constructor image warnings, and not always the same number of times. All I can recommend is to keep your Unity and package versions up to date.