2022.1.0a15 il2CppCodeGeneration change

I had an error after upgrade from 0a12 (and can’t recall seeing it in 0a13 when I tried that a while back),

error CS0117: ‘EditorUserBuildSettings’ does not contain a definition for ‘il2CppCodeGeneration’

I did see there’s an EditorUserBuildSettings.il2CppCodeGeneratione (notice the “e” suffix), but that says deprecated. How do we now switch between UnityEditor.Build.Il2CppCodeGeneration.OptimizeSpeed and UnityEditor.Build.Il2CppCodeGeneration.OptimizeSize - or is that no longer a thing ?

From release notes:

2 Likes

It looks like there is a typo in the name as well: EditorUserBuildSettings.il2CppCodeGeneratione should be EditorUserBuildSettings.il2CppCodeGeneration. We will correct that.

But as the releases notes say, this option was moved to the player settings.

2 Likes

This has been fixed. You can track the issue here: Unity Issue Tracker - EditorUserBuildSettings.il2CppCodeGeneration has typo making it EditorUserBuildSettings.il2CppCodeGeneratione

1 Like