Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Feedback IL2CPP taking much longer than usual Unity 2022.3.12

Discussion in 'Editor & General Support' started by rambii, Apr 22, 2024.

  1. rambii

    rambii

    Joined:
    Jan 7, 2017
    Posts:
    41
    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?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    7,263
    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. ;)
     
  3. rambii

    rambii

    Joined:
    Jan 7, 2017
    Posts:
    41
    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.
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    7,263
    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.
     
  5. rambii

    rambii

    Joined:
    Jan 7, 2017
    Posts:
    41
    But I didn't make many changes other than creating new scripts. And the project location is always the same.
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    12,015
    Weird version.

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

    rambii

    Joined:
    Jan 7, 2017
    Posts:
    41
    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