IL2CPP taking much longer than usual Unity 2022.3.12

I recently switched from Unity 2021.3 to Unity 2022.3.12, and I built my game in Mono and everything worked well. Then when I tried to build in IL2CPP, it took a really long time. Much, much longer than when I did it in Unity 2021.3. When I checked the Editor.log, it showed that it was spending a huge amount of time on /Library/Bee/artifacts/il2cpp_conv_bsez.traceevents. And I mean a lot of time. I am using some pre-compiles assemblies in my project from another project I have so my game can work with a database and I am not sure if that is what is causing the really long build time, or it is just some changes made to Unity in the 2022.3 version. Does anyone have any explanation for why IL2CPP build is taking so long?

IL2CPP builds generally take a lot longer to compile. And more so if it’s a “clean” build respectively the first compile. If you compile again, it should be noticably faster.

Anyway, how many seconds or minutes is “really long time”? I’m afraid the time consortium still hasn’t defined this unit of time. :wink:

Like over an hour and still counting. When I did it in Unity 2021.3 it didn’t take this long, whether it was a clean build or not.

Definitely upgrade to the latest patch release 25f1 and make sure the project root path is excluded from any antivirus, including Defender. Particularly if the project location changed.

I’m guessing you didn’t open in 2022.3 and made a build right away? In that case the cause can be anything that was changed between upgrading and building, not necessarily an issue with the editor version.

But I didn’t make many changes other than creating new scripts. And the project location is always the same.

Weird version.

Upgrade to 2022.3.25f1, early 2022LTS was terrible, now it’s just bad so it may work better for you.

But I didn’t make many changes other than creating new scripts.

Yeah, early 2022 broke my custom Skybox shader, so I went back to 2021. I would’ve stayed with the 2021 version but it kept crashing when I imported my pre-compiled assemblies. After moving to 2022.3, it doesn’t crash when I import pre-compiled assemblies and everything works well. Just building for IL2CPP takes over an hour